-
-
Notifications
You must be signed in to change notification settings - Fork 674
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
Local environment configuration is not respected for app file storage #2867
Comments
This would remove the need to give flatpaks whole file system access, making it a lot more secure. |
FWIW: The primary reason for avoiding a platformdirs dependency was that platformdirs didn't have any support for iOS or Android - and it was problematic to submit patches for those platforms, because iOS and Android weren't officially supported platforms. Now that isn't the case, adding a platformdirs dependency would make more sense (assuming patches upstream have been submitted and accepted). However, this bug notwithstanding, we've essentially got an implementation of platformdirs functionality, so I'm not sure we gain much by replacing a (mostly) working implementation with an external dependency. So - my inclination would be to add the handling necessary to honour XDG variables natively to Toga, and leave it at that. |
It may also be worth evaluating the situation on Windows; it can be a bit more complicated than even the XDG environment variables on Linux since the Windows registry is involved as well....and Windows is likely more relevant to enterprise. |
Hello This typically happens when the environment variables related to storage paths or services (e.g., local storage vs. cloud storage) are not being read or correctly utilized in the code. we have provided the steps for how to do the configuration for file storage properly detects and respects the local environment settings.
|
@HARSHC1503 Thanks, but a DOCX file isn't something we can use - if only because it's a format that can't be edited or opened from the GitHub interface. If the document contains a text description, you can provide the text as a comment on this ticket. If it's a set of code changes, a pull request is the most useful way to contribute that change. |
Its a js file for cloud storage and idk why its even here |
Describe the bug
Toga makes assumptions about which file paths to use for
toga.Paths
; this can conflict with local machine configuration that should affect arbitrary application storage. For instance, on GTK, if I configure my XDG env vars to something other than the default values, then Toga will ignore this.Steps to reproduce
For the system, configure application storage with values other than the default and run a Toga app that creates filesystem content.
Expected behavior
Toga should respect local machine configuration for application storage. Given this configuration can be complex on any given platform, the
platformdirs
package provides nice abstractions. In the least, their logic should be used on Desktop, I think. Outside of Linux distros going rogue....this is also probably important for enterprise environments where IT wants apps to work in a certain way.Screenshots
No response
Environment
Logs
No response
Additional context
I see that #1964 confirms the same default behavior as
platformdirs
....but it seemed to have been a foregone conclusion thatplatformdirs
would not become a dependency for Toga.The text was updated successfully, but these errors were encountered: