mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
fix: CTD when paths are edited
This commit is contained in:
parent
9f1f2c009a
commit
5cfa111f7c
@ -1,5 +1,10 @@
|
|||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
#### Version - 3.0.0.5 -
|
||||||
|
* No longer rehashes files on every compile
|
||||||
|
* Editing paths in the install/compile settings won't crash the app
|
||||||
|
* Fix for .refcache files not being ignored during compilation
|
||||||
|
|
||||||
#### Version - 3.0.0.4 - 8/20/2022
|
#### Version - 3.0.0.4 - 8/20/2022
|
||||||
* Fix for: when some optional game files weren't present (like CreationKit.exe), the app would refuse to recognize any files from that game
|
* Fix for: when some optional game files weren't present (like CreationKit.exe), the app would refuse to recognize any files from that game
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
return (AbsolutePath)(value as string);
|
return AbsolutePath.ConvertNoFailure((string) value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public struct AbsolutePath : IPath, IComparable<AbsolutePath>, IEquatable<Absolu
|
|||||||
if (path.StartsWith(@"\\"))
|
if (path.StartsWith(@"\\"))
|
||||||
return PathFormat.Windows;
|
return PathFormat.Windows;
|
||||||
|
|
||||||
if (DriveLetters.Contains(path[0]) && path[1] == ':')
|
if (path.Length >= 2 && DriveLetters.Contains(path[0]) && path[1] == ':')
|
||||||
return PathFormat.Windows;
|
return PathFormat.Windows;
|
||||||
|
|
||||||
throw new PathException($"Invalid Path format: {path}");
|
throw new PathException($"Invalid Path format: {path}");
|
||||||
@ -192,4 +192,16 @@ public struct AbsolutePath : IPath, IComparable<AbsolutePath>, IEquatable<Absolu
|
|||||||
return Parent.Combine((FileName.WithoutExtension() + append).ToRelativePath()
|
return Parent.Combine((FileName.WithoutExtension() + append).ToRelativePath()
|
||||||
.WithExtension(Extension));
|
.WithExtension(Extension));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AbsolutePath ConvertNoFailure(string value)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return (AbsolutePath) value;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return default;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user