Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,21 @@ private void deleteRemovedFiles(File sourceDir, String sourceRootAbsolutePath, S
if (files != null) {
for (int i = 0; i < files.length; i++) {
File file = files[i];
String targetFilePath = file.getAbsolutePath().replace(sourceRootAbsolutePath, targetRootAbsolutePath);
File targetFile = new File(targetFilePath);
if (file.isFile()) {
if (logger.isEnabled()) {
logger.write("Syncing removed file: " + file.getAbsolutePath().toString());
}

String targetFilePath = file.getAbsolutePath().replace(sourceRootAbsolutePath, targetRootAbsolutePath);
File targetFile = new File(targetFilePath);
targetFile.delete();
} else {
deleteRemovedFiles(file, sourceRootAbsolutePath, targetRootAbsolutePath);

// this is done so empty folders, if any, are deleted after we're don deleting files.
if (targetFile.listFiles().length == 0) {
targetFile.delete();
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,21 @@ private void deleteRemovedFiles(File sourceDir, String sourceRootAbsolutePath, S
if (files != null) {
for (int i = 0; i < files.length; i++) {
File file = files[i];
String targetFilePath = file.getAbsolutePath().replace(sourceRootAbsolutePath, targetRootAbsolutePath);
File targetFile = new File(targetFilePath);
if (file.isFile()) {
if (logger.isEnabled()) {
logger.write("Syncing removed file: " + file.getAbsolutePath().toString());
}

String targetFilePath = file.getAbsolutePath().replace(sourceRootAbsolutePath, targetRootAbsolutePath);
File targetFile = new File(targetFilePath);
targetFile.delete();
} else {
deleteRemovedFiles(file, sourceRootAbsolutePath, targetRootAbsolutePath);

// this is done so empty folders, if any, are deleted after we're don deleting files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is only present in the test-app class. Could you do the same for the build template?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F!@@#%!%$!@#

if (targetFile.listFiles().length == 0) {
targetFile.delete();
}
}
}
}
Expand Down