mirror of
https://github.com/jorio/Pomme.git
synced 2025-01-14 19:29:54 +00:00
FSpOpen: return ioErr if stream is bad
This commit is contained in:
parent
86d35caf94
commit
66edb10132
@ -117,13 +117,13 @@ OSErr HostVolume::OpenFork(const FSSpec* spec, ForkType forkType, char permissio
|
||||
{
|
||||
if (permission == fsCurPerm)
|
||||
{
|
||||
TODO2("fsCurPerm not implemented yet");
|
||||
// TODO: fsCurPerm not implemented yet
|
||||
return unimpErr;
|
||||
}
|
||||
|
||||
if ((permission & fsWrPerm) && forkType != ForkType::DataFork)
|
||||
{
|
||||
TODO2("opening resource fork for writing isn't implemented yet");
|
||||
// TODO: opening resource fork for writing isn't implemented yet
|
||||
return unimpErr;
|
||||
}
|
||||
|
||||
@ -146,9 +146,18 @@ OSErr HostVolume::OpenFork(const FSSpec* spec, ForkType forkType, char permissio
|
||||
return fnfErr;
|
||||
}
|
||||
handle = std::make_unique<HostForkHandle>(ResourceFork, permission, path, *spec);
|
||||
if (!handle->GetStream().good())
|
||||
{
|
||||
return ioErr;
|
||||
}
|
||||
ADFJumpToResourceFork(handle->GetStream());
|
||||
}
|
||||
|
||||
if (!handle->GetStream().good())
|
||||
{
|
||||
return ioErr;
|
||||
}
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user