Skip to content

Commit

Permalink
Fixed problem with zip file not keeping permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
cicchr committed Apr 12, 2018
1 parent 0379502 commit 0b74a03
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libaris/res/edu/rpi/aris/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.42
0.0.43
4 changes: 2 additions & 2 deletions libaris/src/edu/rpi/aris/Update.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ private void unzipFile(File file) throws IOException {
ZipEntry entry = entries.nextElement();
File entryDestination = new File(Update.UPDATE_DOWNLOAD_DIR, entry.getName());
if (entry.isDirectory()) {
if (!entryDestination.mkdirs())
if (!entryDestination.exists() && !entryDestination.mkdirs())
throw new IOException("Failed to unzip file: " + file.getCanonicalPath());
} else {
if (!entryDestination.getParentFile().mkdirs())
if (!entryDestination.getParentFile().exists() && !entryDestination.getParentFile().mkdirs())
throw new IOException("Failed to unzip file: " + file.getCanonicalPath());
try (InputStream in = zipFile.getInputStream(entry);
OutputStream out = new FileOutputStream(entryDestination)) {
Expand Down
1 change: 1 addition & 0 deletions packaging/extra/server/bin/aris-server
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ run_aris() {
echo -n Updating aris ...
rm -rf /usr/lib/aris/*
cp -r $TMP/aris-update/* /usr/lib/aris
chmod +x /usr/lib/aris/bin/*
echo " Done"
fi
done
Expand Down
1 change: 1 addition & 0 deletions packaging/extra/server/bin/aris-update
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ update_aris() {
echo -n Updating aris ...
rm -rf /usr/lib/aris/*
cp -r $TMP/aris-update/* /usr/lib/aris
chmod +x /usr/lib/aris/bin/*
echo " Done"
fi
}
Expand Down

0 comments on commit 0b74a03

Please sign in to comment.