1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

mv: fix "mv fails transfers between dirs"

This commit is contained in:
Roy Ivy III 2018-09-22 23:35:22 -05:00 committed by Roy Ivy III
parent 31ca885c9c
commit fb1d844e14

View file

@ -306,7 +306,7 @@ fn move_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) -
let mut all_successful = true;
for sourcepath in files.iter() {
let targetpath = match sourcepath.as_os_str().to_str() {
let targetpath = match sourcepath.file_name() {
Some(name) => target_dir.join(name),
None => {
show_error!(