fixed empty path name isn't legal (ig)

This commit is contained in:
iAmAsval 2020-03-09 21:24:59 +01:00
parent 166f803ca5
commit d762918baa
2 changed files with 16 additions and 5 deletions

View File

@ -108,8 +108,20 @@ namespace FModel.Methods.Utilities
{
bool bSave = false;
if (!string.IsNullOrEmpty(FProp.Default.FWatermarkFilePath) &&
!File.Exists(FProp.Default.FWatermarkFilePath))
if (FProp.Default.FUseWatermark && string.IsNullOrEmpty(FProp.Default.FWatermarkFilePath))
{
DebugHelper.WriteLine("Watermarking icons enabled but watermark file path is empty, option disabled");
FProp.Default.FUseWatermark = false;
bSave = true;
}
if (FProp.Default.FUseChallengeWatermark && string.IsNullOrEmpty(FProp.Default.FBannerFilePath))
{
DebugHelper.WriteLine("Watermarking challenges enabled but watermark file path is empty, option disabled");
FProp.Default.FUseChallengeWatermark = false;
bSave = true;
}
if (!string.IsNullOrEmpty(FProp.Default.FWatermarkFilePath) && !File.Exists(FProp.Default.FWatermarkFilePath))
{
FProp.Default.FWatermarkFilePath = string.Empty;
FProp.Default.FUseWatermark = false;
@ -119,8 +131,7 @@ namespace FModel.Methods.Utilities
DebugHelper.WriteLine("Watermark file for icons not found, option disabled");
}
if (!string.IsNullOrEmpty(FProp.Default.FBannerFilePath) &&
!File.Exists(FProp.Default.FBannerFilePath))
if (!string.IsNullOrEmpty(FProp.Default.FBannerFilePath) && !File.Exists(FProp.Default.FBannerFilePath))
{
FProp.Default.FBannerFilePath = string.Empty;
FProp.Default.FUseChallengeWatermark = false;

View File

@ -178,7 +178,7 @@ For x32 users, you just have to clone or download the repository and build FMode
This software uses the following open source packages:
- [PakReader](https://github.com/WorkingRobot/PakReader) *Updated Version*
- [PakReader](https://github.com/WorkingRobot/PakReader)
- [AutoUpdater.NET](https://github.com/ravibpatel/AutoUpdater.NET)
- [Avalon Edit](http://avalonedit.net/)
- [Color Picker](https://github.com/drogoganor/ColorPickerWPF)