Skip to content

Commit 215b64b

Browse files
committed
fix error with zip files (fixes #264)
1 parent 15d35d4 commit 215b64b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## unreleased
88

9+
This release fixes a critical issue where invalid zip files could result in the files not being uploaded correctly. To check to see if you are affected, please use the following query:
10+
11+
```
12+
db.uploads.find({"status": "CREATED", "contentType": "multi/files-zipped"})
13+
```
14+
15+
If any files are returned, you should check to see if these files affected and are missing from clowder.
16+
917
### Fixed
18+
- When zip file is uploaded, it will parse the file to check if it is a valid zip file, this couuld result in files not stored in final storage space [#264](https://github.com/clowder-framework/clowder/issues/264)
1019
- Updated swagger documentation
1120
- Return 404 not found when calling file/dataset/space api endpoints with an invalid ID [#251](https://github.com/clowder-framework/clowder/issues/251)
1221

app/fileutils/FilesUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ else if(!fileName.toLowerCase().endsWith(".ptm")){
7171
if(allPTMsFlag.equals("found"))
7272
return "multi/files-ptm-zipped";
7373

74-
} catch (IOException e) {
75-
// TODO Auto-generated catch block
74+
} catch (Throwable e) {
75+
Logger.error("Could not read zipfile", e);
7676
return ("ERROR: " + e.getMessage());
7777
}
7878
return mainFileType;

0 commit comments

Comments
 (0)