Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm: behavior relative to "rm -rf" #580

Open
nDimensionalSpace opened this issue Aug 2, 2024 · 1 comment
Open

drm: behavior relative to "rm -rf" #580

nDimensionalSpace opened this issue Aug 2, 2024 · 1 comment

Comments

@nDimensionalSpace
Copy link

I will note that the docs for drm say "behaves like rm -rf", but that doesn't seem quite correct . . . For plain old rm, the docs say the following:

"-f: Ignore nonexistent files and arguments, never prompt"

However, I am seeing that drm errors out on nonexistent arguments, i.e., if I type:

drm file1 file2,

and file1 doesn't exist, then file2 is not removed, which is . . . painful. Is this intentional, or ??? Thx

@daltonbohning
Copy link
Collaborator

Looks like the walk returns on the first error

int status = mfu_file_lstat(path, &st, mfu_file);
if (status != 0) {
MFU_LOG(MFU_LOG_ERR, "Failed to stat: '%s' (errno=%d %s)",
path, errno, strerror(errno));
return;
}

Not immediately sure the best way to handle this since I think several utilities share this function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants