Skip to content

Commit cf82968

Browse files
committed
fix os.copy
1 parent 36e00e0 commit cf82968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

os/src/FileOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ object copy {
202202

203203
def copyOne(p: Path): Unit = {
204204
val target = to / p.relativeTo(from)
205-
if (mergeFolders && isDir(p, followLinks) && isDir(target, followLinks)) {
205+
if (mergeFolders && isDir(p, followLinks) && (isDir(target, followLinks) || !exists(target,followLinks))) {
206206
// nothing to do
207207
} else {
208208
Files.copy(p.wrapped, target.wrapped, opts1 ++ opts2 ++ opts3: _*)

0 commit comments

Comments
 (0)