Add Browser - disk

This commit is contained in:
Ralf
2024-11-29 20:25:32 +03:00
parent fa2ba37221
commit cb02c59057
36 changed files with 649 additions and 50 deletions
+17
View File
@@ -14,4 +14,21 @@ QString ReadFileString(const QString &filePath, bool* result)
*result = true;
return content;
}
QString GetRootPathWindows(const QString& path)
{
if (path.startsWith("\\\\")) {
int secondSlash = path.indexOf('\\', 2);
if (secondSlash != -1) {
return path.left(secondSlash);
}
}
int firstSlash = path.indexOf('\\');
if (firstSlash != -1) {
return path.left(firstSlash);
}
return path;
}