Skip to content

Commit 0c39440

Browse files
author
jantje
committed
#411 Seems the force did not quite work
1 parent 7ca2947 commit 0c39440

File tree

1 file changed

+6
-1
lines changed
  • it.baeyens.arduino.core/src/it/baeyens/arduino/tools

1 file changed

+6
-1
lines changed

it.baeyens.arduino.core/src/it/baeyens/arduino/tools/Helpers.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,12 @@ public static void addFileToProject(IContainer container, Path path, InputStream
362362
IProgressMonitor monitor, boolean overwrite) throws CoreException {
363363
final IFile file = container.getFile(path);
364364
file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
365-
if (overwrite || !file.exists()) {
365+
if (overwrite && file.exists()) {
366+
file.delete(true, null);
367+
file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
368+
}
369+
370+
if (!file.exists()) {
366371
file.create(contentStream, true, monitor);
367372
}
368373
}

0 commit comments

Comments
 (0)