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

Working directory gets reset when the path doesn't exist #4267

Closed
PhysSong opened this issue Mar 20, 2018 · 1 comment
Closed

Working directory gets reset when the path doesn't exist #4267

PhysSong opened this issue Mar 20, 2018 · 1 comment

Comments

@PhysSong
Copy link
Member

PhysSong commented Mar 20, 2018

I use a directory in my NTFS partition as LMMS working directory. Once I forgot to mount the partition and launch LMMS, the working directory resets without showing "Working directory" dialog.

This is a regression from #4211. canonicalPath function returns an empty string for non-existent paths and causes problem.
I think we can work around by checking for empty string, or use a function that doesn't return an empty string(absolutePath or QDir::cleanPath) in such situations.

In Qt5, QDir::cleanPath has an additional functionalitiy. It always use / for separators.

Edit: CleanPath to cleanPath

@tresf
Copy link
Member

tresf commented Mar 20, 2018

QDir::cleanPath() looks like a sane replacement.

tresf added a commit to tresf/lmms that referenced this issue Mar 22, 2018
tresf added a commit to tresf/lmms that referenced this issue Mar 22, 2018
tresf added a commit to tresf/lmms that referenced this issue Mar 22, 2018
@tresf tresf closed this as completed in 3673e84 Mar 27, 2018
gi0e5b06 pushed a commit to gi0e5b06/lmms that referenced this issue Apr 30, 2018
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this issue Jun 28, 2022
* Use cleanPath for calculating relative directories
Closes LMMS#4267
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