Handle backslashes when matching filenames with config entries (for Windows).

master
Pacman Ghost 5 years ago
parent d4e1bcdeda
commit 176663402b
  1. 3
      src/MainForm.cs

@ -63,7 +63,8 @@ public partial class MainForm : Form
string fullPath = Path.GetFullPath( fname ) ;
if ( fullPath.StartsWith( dataDir ) ) {
key = fname.Substring( dataDir.Length ) ;
if ( key.StartsWith( "/" ) || key.StartsWith( "\\" ) )
key = key.Replace( "\\", "/" ) ;
if ( key.StartsWith( "/" ) )
key = key.Substring( 1 ) ;
} else {
// NOTE: I don't think we should ever get here :-/ If we do, the user will have to manage

Loading…
Cancel
Save