Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
KSemenenko committed Oct 17, 2022
1 parent fab880d commit bba19f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ManagedCode.Storage.Core/Models/LocalFile.cs
Expand Up @@ -37,7 +37,7 @@ public LocalFile(string? path = null, bool keepAlive = false)
Directory.CreateDirectory(directory ?? throw new InvalidOperationException());
}

if (!File.Exists(FilePath))
if (!string.IsNullOrEmpty(FilePath) && !File.Exists(FilePath))
{
var fs = File.Create(FilePath);
fs.Close();
Expand Down

0 comments on commit bba19f3

Please sign in to comment.