mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 14:55:11 +00:00
Trim path separators from start of filenames on extract
This commit is contained in:
@@ -27,6 +27,7 @@ namespace SabreTools.Wrappers
|
||||
|
||||
// Ensure directory separators are consistent
|
||||
var filename = entry.Path.TrimEnd('\0');
|
||||
filename = filename.TrimStart(['\\', '/']);
|
||||
if (Path.DirectorySeparatorChar == '\\')
|
||||
filename = filename.Replace('/', '\\');
|
||||
else if (Path.DirectorySeparatorChar == '/')
|
||||
|
||||
Reference in New Issue
Block a user