diff --git a/DTLib/DTLib.csproj b/DTLib/DTLib.csproj index 4f84074..d3a3feb 100644 --- a/DTLib/DTLib.csproj +++ b/DTLib/DTLib.csproj @@ -2,7 +2,7 @@ DTLib - 1.1.5 + 1.1.7 Timerix Library for all my C# projects GIT diff --git a/DTLib/Filesystem/IOPath.cs b/DTLib/Filesystem/IOPath.cs index eff25f9..d06c9ca 100644 --- a/DTLib/Filesystem/IOPath.cs +++ b/DTLib/Filesystem/IOPath.cs @@ -20,6 +20,8 @@ public readonly struct IOPath public IOPath(string path, bool separatorsFixed=false) { + if (path.IsNullOrEmpty()) + throw new Exception("path is null or empty"); Str = separatorsFixed ? path : FixSeparators(path.ToCharArray()); } diff --git a/DTLib/Filesystem/Path.cs b/DTLib/Filesystem/Path.cs index 1c4dff6..e066c52 100644 --- a/DTLib/Filesystem/Path.cs +++ b/DTLib/Filesystem/Path.cs @@ -32,13 +32,14 @@ public static class Path case ':': case ';': r[i] = '-'; break; - case '\n': case '\r': case ' ': - case '#': case '%': case '&': - case '{': case '}': case '<': - case '>': case '*': case '?': - case '$': case '!': case '\'': - case '"': case '@': case '+': - case '`': case '|': case '=': + case '\n': case '\r': case '\'': + case '"': case '`': + break; + case ' ': case '&': case '{': case '}': + case '<': case '>': case '*': case '?': + case '$': case '%': case '@': case '|': + // case '!': + // case '#': r[i] = '_'; break; }