Skip to content

Commit

Permalink
Alpha28: Fixed IOException that happened while trying to list in a no…
Browse files Browse the repository at this point in the history
…n-existent dir
  • Loading branch information
hsilva-keep committed Mar 29, 2017
1 parent d6be81e commit 07c793a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>org.roda-project</groupId>
<artifactId>commons-ip</artifactId>
<packaging>jar</packaging>
<version>1.0.0-alpha27</version>
<version>1.0.0-alpha28</version>
<name>RODA Commons IP - Library to manipulate Information Packages of different formats: RODA, E-ARK, etc.</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static Path extractIPIfInZipFormat(final Path source, Path destinationDir
// 20161111 hsilva: see if the IP extracted has a folder which contains
// the content of the IP (for being compliant with previous way of
// creating SIP in ZIP format, this test/adjustment is needed)
if (!Files.exists(destinationDirectory.resolve(IPConstants.METS_FILE))) {
if (Files.exists(destinationDirectory) && !Files.exists(destinationDirectory.resolve(IPConstants.METS_FILE))) {
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(destinationDirectory)) {
for (Path path : directoryStream) {
if (Files.isDirectory(path) && Files.exists(path.resolve(IPConstants.METS_FILE))) {
Expand Down

0 comments on commit 07c793a

Please sign in to comment.