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 fix for Documents folder not being in the default location. #51

Merged
merged 1 commit into from
Nov 3, 2022
Merged

Windows fix for Documents folder not being in the default location. #51

merged 1 commit into from
Nov 3, 2022

Conversation

HotaruBlaze
Copy link
Contributor

@HotaruBlaze HotaruBlaze commented Nov 2, 2022

Windows allows you to move/store a users subfolders, such as Documents in a different location, This could be another hard drive to make reinstalling not as tedious.
explorer_3INTsJl4U0
The below code however assumes that these are only stored in the default location, such as C:\Users\Username.

os.path.expanduser('~/Documents/NSO-RPC')

This commit resolves this by wrapping the path in a getAppPath() function, and attempting to get the path from Windows and falling back on the above method if it fails or not on windows.

Attempting to use the Default location can cause strange behavioural issues in windows, depending on how the locations were setup. as well as how the application handles it.


I also believe this could have affected #10 however this issue is stale and I haven't tested Windows 11

Edit: This PR should resolve errors such as
vmconnect_ipqU8ZLmMW

@MCMi460 MCMi460 merged commit 495a012 into MCMi460:development Nov 3, 2022
@MCMi460
Copy link
Owner

MCMi460 commented Nov 3, 2022

Thank you so much for doing this!
I also added commit e1731d8 to use this function for logging files and temporary token files. Thank you again for spending time on helping me with this problem.

@HotaruBlaze HotaruBlaze deleted the WindowsPathFix branch November 5, 2022 13:21
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