mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Issue #79 Path elements below the root are no longer salient in xpmp2
This commit is contained in:
@@ -461,15 +461,10 @@ namespace BlackMisc
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList dirNames;
|
// just the name of the dir containing xsbaircraft.txt
|
||||||
dirNames.append(relativePath.split('/', Qt::SkipEmptyParts));
|
|
||||||
// Replace the first one being the package name with the package root dir
|
|
||||||
QString packageRootDir = package.path.mid(package.path.lastIndexOf('/') + 1);
|
QString packageRootDir = package.path.mid(package.path.lastIndexOf('/') + 1);
|
||||||
dirNames.replace(0, packageRootDir);
|
package.planes.back().dirNames = QStringList { packageRootDir };
|
||||||
// Remove the last one being the obj itself
|
|
||||||
dirNames.removeLast();
|
|
||||||
|
|
||||||
package.planes.back().dirNames = dirNames;
|
|
||||||
package.planes.back().filePath = fullPath;
|
package.planes.back().filePath = fullPath;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user