1
0
mirror of https://github.com/chylex/Brotli-Builder.git synced 2025-05-11 02:34:13 +02:00

Fix relative paths in BrotliCalc

This commit is contained in:
chylex 2020-03-30 11:15:15 +02:00
parent 55f3010362
commit 7afdbe3e10

View File

@ -37,7 +37,8 @@ namespace BrotliCalc.Helpers{
return new BrotliFileGroup[]{ new BrotliFileGroup(file, Array.Empty<BrotliFile.Compressed>()) };
}
int fullPathLength = Path.GetFullPath(path).Length;
path = Path.GetFullPath(path);
int fullPathLength = path.Length;
string GetRelativePath(string file){
return file.Substring(fullPathLength).Replace(Path.DirectorySeparatorChar, DirectorySeparator).Replace(Path.AltDirectorySeparatorChar, DirectorySeparator).TrimStart(DirectorySeparator);