Skip to content

Commit

Permalink
Fixes #554 file is readonly (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
msevestre authored Apr 28, 2021
1 parent 033758e commit e7c4d84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MoBi.Core/Serialization/ORM/ContextPersistor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void Save(IMoBiContext context)
private void verifyFileNotReadOnly(string projectFilePath)
{
var fileInfo = new FileInfo(projectFilePath);
if (!fileInfo.IsReadOnly)
if (!fileInfo.Exists || !fileInfo.IsReadOnly)
return;

throw new OSPSuiteException(AppConstants.Exceptions.FileIsReadOnly(projectFilePath));
Expand Down

0 comments on commit e7c4d84

Please sign in to comment.