1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

rmdir: use is_empty()

This commit is contained in:
John Shin 2023-07-28 17:10:36 -07:00
parent 0d56792c58
commit 426cce7df0

View file

@ -100,7 +100,7 @@ fn remove(mut path: &Path, opts: Opts) -> Result<(), Error<'_>> {
if opts.parents {
while let Some(new) = path.parent() {
path = new;
if path.as_os_str() == "" {
if path.as_os_str().is_empty() {
break;
}
remove_single(path, opts)?;