FileSys: split the constructor into an Open method, in order to notify the opener something went wrong.

Kernel: Return an invalid handle to OpenFile when it failed to open.
This commit is contained in:
Emmanuel Gil Peyrot
2014-10-06 19:58:42 +02:00
parent 23c2fbfc7a
commit 0be5c03176
7 changed files with 57 additions and 14 deletions
+3
View File
@@ -374,6 +374,9 @@ Handle OpenFileFromArchive(Handle archive_handle, const std::string& path, const
file->path = path;
file->backend = archive->backend->OpenFile(path, mode);
if (!file->backend)
return 0;
return handle;
}