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

@ -211,14 +211,21 @@ namespace Snap2HTML
// add slash or backslash to end of link (in cases where it is clear that we we can)
if( settings.linkFiles )
{
if( !settings.linkRoot.EndsWith( @"/" ) && settings.linkRoot.ToLower().StartsWith( @"http" ) ) // web site
if( !settings.linkRoot.EndsWith( @"/" ) )
{
if( settings.linkRoot.ToLower().StartsWith( @"http" ) ) // web site
{
settings.linkRoot += @"/";
}
if( !settings.linkRoot.EndsWith( @"\" ) && Utils.IsWildcardMatch( "?:*", settings.linkRoot, false ) ) // local disk
if( Utils.IsWildcardMatch( "?:*", settings.linkRoot, false ) ) // local disk
{
settings.linkRoot += @"\";
}
if( settings.linkRoot.StartsWith( @"\\" ) ) // unc path
{
settings.linkRoot += @"\";
}
}
}
Cursor.Current = Cursors.WaitCursor;