Usable length can differ

This commit is contained in:
Matt Nadareski
2016-04-21 14:54:12 -07:00
parent 40a4cfe8d9
commit 40a5f624d9

View File

@@ -100,7 +100,7 @@ namespace SabreTools
} }
// Windows max name length is 260 // Windows max name length is 260
int usableLength = 259 - _path.Length; int usableLength = 260 - rom.Game.Length - _path.Length;
if (rom.Name.Length > usableLength) if (rom.Name.Length > usableLength)
{ {
string ext = Path.GetExtension(rom.Name); string ext = Path.GetExtension(rom.Name);