[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.
Please register or sign in to comment