Cannot trash directories on a different partition
SimonBranch opened this issue · 3 comments
SimonBranch commented
From util.d
:
void renameOrCopy(in string src, in string tgt) {
try {
src.rename(tgt);
} catch (FileException e) {
if (e.errno != EXDEV)
throw e;
src.copy(tgt);
src.remove();
}
}
Note that src.copy(tgt)
only works for regular files — it'll throw EISDIR
is src
is a directory. A better approach here is to recursively copy and delete src
.
rushsteve1 commented
rushsteve1 commented
@SimonBranch can you try the version from the latest commit
rushsteve1 commented
Closing this as fixed in version 15