Cherry-pick part of 14f6e32

This brings EDA_DRAW_FRAME::LockFile into compliance with the lockfile.h
status code.  This was part of a larger commit in the master branch but
the return code checking is needed for v7
This commit is contained in:
Seth Hillbrand 2023-06-22 18:15:06 +02:00
parent 2f35d97b27
commit 7bcd3e2262
1 changed files with 3 additions and 4 deletions

View File

@ -230,10 +230,9 @@ bool EDA_DRAW_FRAME::LockFile( const wxString& aFileName )
m_file_checker = std::make_unique<LOCKFILE>( aFileName );
// If the file is not valid, or is successfully locked, return true
// Invalid lockfiles are the result of bad permissions, so this is
// likely not a file that we can override regardless
return !m_file_checker->Valid() || m_file_checker->Locked();
// If the file is valid, return true. This could mean that the file is
// locked or it could mean that the file is read-only
return m_file_checker->Valid();
}