Closed raiguard closed 6 years ago
I will take a look into it. There is probably a way for Python to correctly detect symlinks, too. Thanks for the report!
I do not have much time atm, but I will take a look at it asap
@raiguard could you try the latest build from https://ci.appveyor.com/project/thatsIch/sublime-rainmeter/branch/master/artifacts and tell me if it works?
Sorry for the late reply. No, now it doesn't work with any of the skins, even the ones that aren't symlinked.
ok, I guess I have to set up a testing bench. Could you describe me in more details your setup so I can replicate it?
I’ll do my best, but I’m on a school trip at the moment so I don’t have access to my PC.
All of my Rainmeter projects (because I have several) are under D:/Caleb/Development/Rainmeter/Projects
. For any that are using GitHub (e.g. ModernGadgets), the skins would be contained in D:/Caleb/Development/Rainmeter/Projects/ModernGadgets/Skins/ModernGadgets
. That folder is symlinked (as a junction) to D:/Settings/Caleb/Rainmeter/Skins/ModernGadgets
.
Let me know if you need any more info, I’ll do my best.
ok, I'll take a look. Sounds like easy to replicate
Ok, this is from the current point of view no easy task.
The problem is, that your symlinked folder has no clue that it is symlinked. I go see, if I find a decent workaround for it
I cannot assume that the symlinked folder and the symlink have the same name
Rainmeter requires the name of the symlink
Python can't follow the symlinks as it does not detect them. Even if I turn off link following it still lists them. Apparently, it is a bug on windows.
I found a way since Rainmeter is only on Windows to use the ctypes
API,
especially ctypes.windll.kernel32.GetFileAttributesW
to detect if a folder is a symlink
Even then it just detects the ReparsePoint and does not indicate if it is really a symbolic link.
You can do something like calling a dir process and check its attributes like in
I fixed the config detection for now, but the refresh still does not work since the file could not been extracted, but should be easy for now
Could you try the latest version on the CI?
https://ci.appveyor.com/project/thatsIch/sublime-rainmeter/branch/master/artifacts
If you confirm it working, I will release it as the next revision.
My Rainmeter projects are managed in a separate folder, and symlinked into the Rainmeter skins folder. When the package tries to refresh any of the skins in a symlinked config, it results in a "The config could not be found" error. However, all regular, non-symlinked skins will refresh just fine.