-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
handlerUSS API handler implementationUSS API handler implementationuss-phase1USS/UFS Phase 1 feature packUSS/UFS Phase 1 feature pack
Milestone
Description
Summary
ussDeleteHandler currently probes for path existence (via ufs_fopen + ufs_diropen) before calling ufs_remove() or ufs_rmdir(), because ufs_remove() returns 0 even for non-existent paths (see mvslovers/ufsd#9).
Once ufsd properly returns UFSD_RC_NOFILE for non-existent paths, this workaround can be simplified back to the original strategy:
- Try
ufs_remove()— check return code - If
UFSD_RC_ISDIR→ufs_rmdir()oruss_recursive_delete() - If
UFSD_RC_NOFILE→ 404
Affected code
src/ussapi.c,ussDeleteHandler— theufs_fopen/ufs_diropenprobe block
Depends on
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
handlerUSS API handler implementationUSS API handler implementationuss-phase1USS/UFS Phase 1 feature packUSS/UFS Phase 1 feature pack