fix: use toLocalFile() instead of path()

QUrl::path() adds a '/' at the beginning of the path on Windows, causing
the world to explode every once in a while.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2023-03-05 08:24:56 -03:00
parent 9265c319a9
commit 06de728aa7

View File

@ -320,7 +320,7 @@ std::optional<QStringList> MMCZip::extractSubDir(QuaZip *zip, const QString & su
if (relative_file_name.isEmpty()) { if (relative_file_name.isEmpty()) {
target_file_path = target + '/'; target_file_path = target + '/';
} else { } else {
target_file_path = FS::PathCombine(target_top_dir.path(), sub_path, relative_file_name); target_file_path = FS::PathCombine(target_top_dir.toLocalFile(), sub_path, relative_file_name);
if (relative_file_name.endsWith('/') && !target_file_path.endsWith('/')) if (relative_file_name.endsWith('/') && !target_file_path.endsWith('/'))
target_file_path += '/'; target_file_path += '/';
} }