Skip to content

Commit

Permalink
Fix hang when any sort of even transient error happens in iOSFS
Browse files Browse the repository at this point in the history
I am a dumbass

Fixed ish-app#739
  • Loading branch information
tbodt committed Jun 2, 2020
1 parent 48f3cd0 commit a406aef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/iOSFS.m
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,15 @@ static int iosfs_umount(struct mount *mount) {
extern const struct fd_ops iosfs_fdops;

static int posixErrorFromNSError(NSError *error) {
if (error == nil)
return 0;
while (error != nil) {
if (error.domain == NSPOSIXErrorDomain) {
if ([error.domain isEqualToString:NSPOSIXErrorDomain]) {
return err_map((int) error.code);
}
error = error.userInfo[NSUnderlyingErrorKey];
}
return 0;
return _EINVAL;
}

static int combine_error(NSError *coordinatorError, int err) {
Expand Down

0 comments on commit a406aef

Please sign in to comment.