Skip to content

Commit

Permalink
[XProtocol.hh] Added fallthrough statement for ENOTEMPTY errno code m…
Browse files Browse the repository at this point in the history
…apping
  • Loading branch information
ccaffy committed May 30, 2023
1 parent 7a1295a commit ad9d26b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/XProtocol/XProtocol.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,12 @@ static int mapError(int rc)
case ENOTBLK: return kXR_NotFile;
case ENOTSUP: return kXR_Unsupported;
case EISDIR: return kXR_isDirectory;
case EEXIST: return kXR_ItExists;
case ENOTEMPTY: [[fallthrough]];
// In the case one tries to delete a non-empty directory
// we have decided that until the next major release
// the kXR_ItExists flag will be returned
case EEXIST:
return kXR_ItExists;
case EBADRQC: return kXR_InvalidRequest;
case ETXTBSY: return kXR_inProgress;
case ENODEV: return kXR_FSError;
Expand All @@ -1391,10 +1396,6 @@ static int mapError(int rc)
case ETIMEDOUT: return kXR_ReqTimedOut;
case EBADF: return kXR_FileNotOpen;
case ECANCELED: return kXR_Cancelled;
// In the case one tries to delete a non-empty directory
// we have decided that until the next major release
// the kXR_ItExists flag will be returned
case ENOTEMPTY: return kXR_ItExists;
default: return kXR_FSError;
}
}
Expand Down

0 comments on commit ad9d26b

Please sign in to comment.