Skip to content

Commit ae72083

Browse files
committed
fix(rm): empty path hanlding
1 parent 0172c29 commit ae72083

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rm.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ fn remove_recursive(path: &Path, opts: &RmOptions) -> Result<()> {
7373
}
7474

7575
fn remove(path_str: String, options: Option<RmOptions>) -> Result<()> {
76-
let search_path_str = if path_str.is_empty() { "." } else { &path_str };
77-
let path = Path::new(search_path_str);
76+
let path = Path::new(&path_str);
7877

7978
let opts = options.unwrap_or(RmOptions {
8079
force: Some(false),

0 commit comments

Comments
 (0)