Skip to content

Commit 9a01e30

Browse files
author
Federico Fissore
committed
Compiler: don't filter out existing sketch files, overwrite them. Fixes #3440
1 parent 4313f2a commit 9a01e30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arduino-core/src/processing/app/debug/Compiler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.nio.file.Files;
3030
import java.nio.file.Path;
3131
import java.nio.file.Paths;
32+
import java.nio.file.StandardCopyOption;
3233
import java.util.*;
3334
import java.util.stream.Stream;
3435

@@ -1416,11 +1417,10 @@ private void copyAdditionalFilesToBuildFolderSavingOriginalFolderStructure(Sketc
14161417
throw new RunnerException(e);
14171418
}
14181419
otherFilesStream.map((path) -> new Pair<>(path, Paths.get(buildPath, sketchPath.relativize(path).toString())))
1419-
.filter((pair) -> !Files.exists(pair.value))
14201420
.forEach((pair) -> {
14211421
try {
14221422
Files.createDirectories(pair.value.getParent());
1423-
Files.copy(pair.key, pair.value);
1423+
Files.copy(pair.key, pair.value, StandardCopyOption.REPLACE_EXISTING);
14241424
} catch (IOException e) {
14251425
e.printStackTrace();
14261426
throw new RuntimeException(I18n.format(_("Problem moving {0} to the build folder"), sketchPath.relativize(pair.key).toString()));

0 commit comments

Comments
 (0)