Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix symlink handling during theme lookup #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aacebedo
Copy link

Hello,

On NixOS when themes are installed, they are not stored inside real directories but are symlinked.
I noticed that when using swaysettings, it was unable to find the currently installed themes because the symlinks were not followed.

I made this patch which solves the issue. I am not an expert of glib nor vala so you may want to handle this in another way, do not hesitate to comment and tell me what to modify ;)

Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also format the code using uncrustify

@@ -319,13 +319,23 @@ namespace SwaySettings {
if (min_ver % 2 != 0) min_ver++;

foreach (string path in paths) {
while(FileUtils.test(path, FileTest.IS_SYMLINK)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these while loops be if statements?

@ErikReider
Copy link
Owner

Sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants