Skip to content

Commit 808ab4d

Browse files
committed
Revert "creating target dirs when they dont exists before copying the files"
This reverts commit 75e4f5d.
1 parent 51b1815 commit 808ab4d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

framework/bundles/org.jboss.tools.rsp.server.spi/src/main/java/org/jboss/tools/rsp/server/spi/publishing/AbstractFilesystemPublishController.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,9 @@ public FileVisitResult preVisitDirectory(final Path dir,
462462
@Override
463463
public FileVisitResult visitFile(final Path file,
464464
final BasicFileAttributes attrs) throws IOException {
465-
Path resolvedTargetPath = targetPath.resolve(sourcePath.relativize(file));
466-
Files.createDirectories(resolvedTargetPath);
467-
Files.copy(file, resolvedTargetPath, StandardCopyOption.REPLACE_EXISTING);
468-
return FileVisitResult.CONTINUE;
465+
Files.copy(file,
466+
targetPath.resolve(sourcePath.relativize(file)), StandardCopyOption.REPLACE_EXISTING);
467+
return FileVisitResult.CONTINUE;
469468
}
470469
}
471470

0 commit comments

Comments
 (0)