mirror of
https://github.com/nushell/nushell.git
synced 2024-11-26 02:13:47 +01:00
rm: don't update target_exists every time in the loop (#6837)
This commit is contained in:
parent
b2c29117d9
commit
c6436eb32f
@ -231,10 +231,12 @@ fn rm(
|
||||
) {
|
||||
Ok(files) => {
|
||||
for file in files {
|
||||
target_exists = true;
|
||||
|
||||
match file {
|
||||
Ok(ref f) => {
|
||||
if !target_exists {
|
||||
target_exists = true;
|
||||
}
|
||||
|
||||
// It is not appropriate to try and remove the
|
||||
// current directory or its parent when using
|
||||
// glob patterns.
|
||||
|
Loading…
Reference in New Issue
Block a user