Bugfix: UNC paths stopped working since 2.1

This commit is contained in:
rlv-dan
2020-08-09 13:31:17 +02:00
parent a68b36c02e
commit b3476e455a
3 changed files with 35 additions and 4 deletions

View File

@ -65,7 +65,23 @@ namespace Snap2HTML
public string GetFullPath()
{
return ( this.Path + "\\" + this.Name ).Replace( "\\\\", "\\" );
string path;
if( this.Path.EndsWith( @"\" ) )
path = this.Path + this.Name;
else
path = this.Path + @"\" + this.Name;
if( path.EndsWith( @"\" ) ) // remove trailing backslash
{
if(!Utils.IsWildcardMatch( @"?:\", path, false )) // except for drive letters
{
path = path.Remove( path.Length - 1 );
}
}
return path;
}
public string GetProp( string key )