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 9fe9a7d commit a979cae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/XProtocol/XProtocol.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,11 @@ 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 EEXIST: [[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 ENOTEMPTY: return kXR_ItExists;
case EBADRQC: return kXR_InvalidRequest;
case ETXTBSY: return kXR_inProgress;
case ENODEV: return kXR_FSError;
Expand All @@ -1391,10 +1395,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 a979cae

Please sign in to comment.