File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
plugins/builtin/source/content/providers Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,7 @@ namespace hex::plugin::builtin {
171171 m_writable = false ;
172172
173173 if (m_diskHandle == INVALID_HANDLE_VALUE) {
174- this ->setErrorMessage (hex::formatSystemError (::GetLastError ()));
175- return false ;
174+ return OpenResult::failure (hex::formatSystemError (::GetLastError ()));
176175 }
177176 }
178177
@@ -194,12 +193,12 @@ namespace hex::plugin::builtin {
194193 }
195194
196195 if (m_diskHandle == nullptr || m_diskHandle == INVALID_HANDLE_VALUE) {
197- this -> setErrorMessage ( hex::formatSystemError (:: GetLastError ()) );
196+ auto error = :: GetLastError ();
198197 m_readable = false ;
199198 m_diskHandle = nullptr ;
200199 CloseHandle (m_diskHandle);
201200
202- return false ;
201+ return OpenResult::failure ( hex::formatSystemError (error)) ;
203202 }
204203
205204 #else
You can’t perform that action at this time.
0 commit comments