Skip to content

Commit

Permalink
Merge branch 'main' into react19-legacy-peer-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- authored Jan 10, 2025
2 parents f0a5d40 + 07d230e commit b3f9e13
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ window.Vaadin.Flow.dndConnector = {
if (element['__active']) {
element.addEventListener('dragenter', this.__ondragenterListener, false);
element.addEventListener('dragover', this.__ondragoverListener, false);
element.addEventListener('dragleave', this.__ondragleaveListener, true);
element.addEventListener('dragleave', this.__ondragleaveListener, false);
element.addEventListener('drop', this.__ondropListener, false);
} else {
element.removeEventListener('dragenter', this.__ondragenterListener, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,24 +493,29 @@ private void extractFile(File archive, File destinationDirectory)
"The archive file {} is corrupted and will be deleted. "
+ "Please run the application again.",
archive.getPath());
boolean deleted = archive.delete();
if (!deleted) {
getLogger().error("Failed to remove archive file {}. "
+ "Please remove it manually and run the application.",
archive.getPath());
}
removeArchiveFile(archive);
try {
FileUtils.deleteDirectory(destinationDirectory);
} catch (IOException ioe) {
getLogger().error("Failed to remove target directory '{}'",
destinationDirectory, ioe);
}
} else {
removeArchiveFile(archive);
}

throw e;
}
}

private static void removeArchiveFile(File archive) {
if (!archive.delete()) {
getLogger().error("Failed to remove archive file {}. "
+ "Please remove it manually and run the application.",
archive.getPath());
}
}

private void downloadFileIfMissing(URI downloadUrl, File destination,
String userName, String password) throws DownloadException {
if (!destination.exists()) {
Expand All @@ -522,6 +527,7 @@ private void downloadFileIfMissing(URI downloadUrl, File destination,
return;
} catch (DownloadException e) {
if (i == MAX_DOWNLOAD_ATTEMPS - 1) {
removeArchiveFile(destination);
throw e;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"async": "3.2.6",
"glob": "11.0.0",
"typescript": "5.7.2",
"typescript": "5.7.3",
"workbox-core": "7.3.0",
"workbox-precaching": "7.3.0",
"strip-css-comments": "5.0.0"
Expand Down

0 comments on commit b3f9e13

Please sign in to comment.