add drive root check, version bump

This commit is contained in:
IsWaffle 2023-11-15 09:57:27 -05:00
parent 73b23b97ad
commit 9e086962dc
2 changed files with 10 additions and 3 deletions

View File

@ -148,6 +148,7 @@ public static class FileHelper
{ {
EndsWith = 0, EndsWith = 0,
Contains = 1, Contains = 1,
DriveRoot = 2
} }
public static bool CheckPathForProblemLocations(string path, out string detectedName) public static bool CheckPathForProblemLocations(string path, out string detectedName)
@ -162,6 +163,7 @@ public static class FileHelper
{ "NextCloud", PathCheckType.Contains }, { "NextCloud", PathCheckType.Contains },
{ "DropBox", PathCheckType.Contains }, { "DropBox", PathCheckType.Contains },
{ "Google", PathCheckType.Contains }, { "Google", PathCheckType.Contains },
{ "Drive Root", PathCheckType.DriveRoot}
}; };
foreach (var name in problemNames) foreach (var name in problemNames)
@ -182,7 +184,12 @@ public static class FileHelper
return true; return true;
} }
break; break;
default: case PathCheckType.DriveRoot:
if (Regex.Match(path.ToLower(), @"^\w:(\\|\/)$").Success)
{
detectedName = name.Key;
return true;
}
break; break;
} }
} }

View File

@ -9,8 +9,8 @@
<PackageIcon>icon.ico</PackageIcon> <PackageIcon>icon.ico</PackageIcon>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon> <ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<Configurations>Debug;Release;TEST</Configurations> <Configurations>Debug;Release;TEST</Configurations>
<AssemblyVersion>2.20</AssemblyVersion> <AssemblyVersion>2.21</AssemblyVersion>
<FileVersion>2.20</FileVersion> <FileVersion>2.21</FileVersion>
<Company>SPT-AKI</Company> <Company>SPT-AKI</Company>
</PropertyGroup> </PropertyGroup>