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

Windows Site Data Directory #51

Open
emcd opened this issue Dec 25, 2014 · 1 comment
Open

Windows Site Data Directory #51

emcd opened this issue Dec 25, 2014 · 1 comment

Comments

@emcd
Copy link

emcd commented Dec 25, 2014

Hi,

I just recently discovered your nice appdirs module. Several years ago, I wrote a module with similar functionality, utilia.filesystem.stdpath:

Although, I think we have much overlap, I took a divergent approach to the Windows site data directory and want to share some of my research and code with you, in case you're interested. I noticed in the appdirs code comments, there is some dissatisfaction with the results of using CSIDL_COMMON_APPDATA to get the site data directory on Vista and newer. In my approach, I regarded the path indicated by %ProgramFiles% to be the true equivalent of /usr/local/share and /Library/Application Support. Also, as part of my initial research, I found some newer documentation on Windows standard paths, which indicated that KNOWNFOLDERID is the standard in use, instead of CSIDL, on Vista and beyond:

The second KNOWNFOLDERID URL above contains a trove of information on folder GUIDs as well as environment variables and paths relative to those variables. (If you go the "Remarks" section near the bottom of the page, you will see a thorough discussion about %ProgramFiles% on 32-bit and 64-bit systems.) My implementation, based on that discussion is here:

I would be happy to discuss this more, if you're interested.

P.S. My research links: https://utilia.readthedocs.org/en/latest/modules/filesystem/stdpath.html#references

@2xB
Copy link

2xB commented Mar 27, 2019

On the same note: The Vista path of CSIDL_COMMON_APPDATA actually is a path that is supposed to be used by applications, as is explained here: https://stackoverflow.com/a/6253923

Therefore naming it "fail" might not hit the point. Nevertheless, emcd mentioned %ProgramFiles%, which of course can also be considered a storage location for application data.

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

No branches or pull requests

2 participants