parent
29c7344540
commit
71192cc2ee
15 changed files with 21 additions and 22 deletions
|
|
@ -77,7 +77,7 @@ namespace FileManager
|
|||
return fullfilename;
|
||||
}
|
||||
|
||||
/// <summary>Use with full path, not file name. Valid path characters which are invalid file name characters will be retained: '\\', '/'</summary>
|
||||
/// <summary>Use with full path, not file name. Valid path charaters which are invalid file name characters will be retained: '\\', '/'</summary>
|
||||
public static LongPath GetSafePath(LongPath path, ReplacementCharacters replacements)
|
||||
{
|
||||
ArgumentValidator.EnsureNotNull(path, nameof(path));
|
||||
|
|
@ -147,7 +147,7 @@ namespace FileManager
|
|||
// regex is easier by ending with separator
|
||||
fullfilename += Path.DirectorySeparatorChar;
|
||||
fullfilename = removeInvalidWhitespace_regex.Replace(fullfilename, Path.DirectorySeparatorChar.ToString());
|
||||
// take separator back off
|
||||
// take seperator back off
|
||||
fullfilename = RemoveLastCharacter(fullfilename);
|
||||
|
||||
fullfilename = removeDoubleSlashes(fullfilename);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue