mirror of
https://github.com/nushell/nushell.git
synced 2025-08-19 08:01:30 +02:00
Allow cp to overwrite existing files (#1339)
This commit is contained in:
@@ -252,7 +252,7 @@ impl Shell for FilesystemShell {
|
||||
|
||||
if entry.is_file() {
|
||||
let strategy = |(source_file, _depth_level)| {
|
||||
if destination.exists() {
|
||||
if destination.is_dir() {
|
||||
let mut new_dst = dunce::canonicalize(destination.clone())?;
|
||||
if let Some(name) = entry.file_name() {
|
||||
new_dst.push(name);
|
||||
|
Reference in New Issue
Block a user