uutils/coreutils

mv: error message "Directory not empty" is confusing

已關閉

#5,102 建立於 2023年7月20日

 (16 則留言) (0 個反應) (0 位負責人)Rust (1,981 個分叉)batch import
U - mvgood first issue

倉庫指標

星標
 (23,893 顆星)
PR 合併指標
 (平均合併 5天 23小時) (30 天內合併 239 個 PR)

描述

in file coreutils/src/uu/mv/src/mv.rs:488 when you try to move a directory to a location already containing a directory with the same name it would just write "Directory not empty" first, this is technically a wrong error message because there is no requirement that the destination would be empty. the destination might as well be populated with some content, we just require that it would not contain a directory with the same name. also, the error message is confusing because it doesn't state that the problem is with the destination. One can think that the problem is actually with the source, and that the source directory having some kind of attribute that would require it to be empty prior to moving. I would suggest to change the error message to: "a directory with the same name already exists at destination"

貢獻者指南