mirror of
https://github.com/Adaptix-Framework/AdaptixC2
synced 2026-06-08 10:20:39 +00:00
Agents context menu
This commit is contained in:
@@ -25,6 +25,9 @@ QString GetBasenameWindows(const QString& path)
|
||||
|
||||
QString GetRootPathWindows(const QString& path)
|
||||
{
|
||||
if (path.startsWith("\\\\") && path.count("\\") == 2)
|
||||
return path;
|
||||
|
||||
if (path.startsWith("\\\\")) {
|
||||
int secondSlash = path.indexOf('\\', 2);
|
||||
if (secondSlash != -1) {
|
||||
@@ -45,7 +48,7 @@ QString GetParentPathWindows(const QString& path)
|
||||
if (path.length() == 2 && path[1] == ':')
|
||||
return path;
|
||||
|
||||
if (path.startsWith("\\\\") && !path.contains('\\'))
|
||||
if (path.startsWith("\\\\") && path.count("\\") == 2)
|
||||
return path;
|
||||
|
||||
QString parentPath = path;
|
||||
|
||||
Reference in New Issue
Block a user