Skip to content
Commit f0ec9d38 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

[StorageAccess] Fix storageAccessFromPath returning unmounted filesystems

Appending a separator makes the empty path returned for e.g. an unmounted
filesystem indistinguishable from the filesystem root `/`.

Instead of adding more checks and fixups simplify the match to only
suceed if the given path matches the mountpoint exactly, or the trailing,
unmatched part of the path is a new path component.

Replace QDir::separator with '/', as Qt normalizes file paths to use
'/' as separators, see QFileInfo::canonicalFilePath

Make sure this case is also covered by tests.
parent 0b56431c
Pipeline #676536 passed with stage
in 6 minutes and 4 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment