Skip to content

Commit 101b89b

Browse files
authored
Fix 3.8.1 (#818)
* fix!!! * 3.8.1
1 parent 88b6153 commit 101b89b

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

@rbv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit d9e6649023b80aeb93ef4668886c1a674dbfae0c
1+
Subproject commit 3dd1a61aefbdab01d1c8d2bbc1be74193cb57749

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111
<groupId>com.rebuild</groupId>
1212
<artifactId>rebuild</artifactId>
13-
<version>3.8.0</version>
13+
<version>3.8.1</version>
1414
<name>rebuild</name>
1515
<description>Building your business-systems freely!</description>
1616
<url>https://getrebuild.com/</url>

src/main/java/com/rebuild/core/Application.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
7474
/**
7575
* Rebuild Version
7676
*/
77-
public static final String VER = "3.8.0";
77+
public static final String VER = "3.8.1";
7878
/**
7979
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
8080
*/
81-
public static final int BUILD = 3080004;
81+
public static final int BUILD = 3080106;
8282

8383
static {
8484
// Driver for DB

src/main/java/com/rebuild/core/service/files/BatchDownload.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected File exec() throws Exception {
5959
}
6060
}
6161

62-
CompressUtils.forceZip(tmp, tmpZip, null);
62+
CompressUtils.forceZip(tmpZip, tmp, null);
6363
destZip = tmpZip.exists() ? tmpZip : null;
6464

6565
return destZip;

src/main/java/com/rebuild/core/support/setup/DatafileBackup.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ public File backup(File backups) throws IOException {
3434
File rbdata = RebuildConfiguration.getFileOfData("");
3535

3636
String destName = "backup_datafile." + CalendarUtils.getPlainDateTimeFormat().format(CalendarUtils.now()) + ".zip";
37-
File dest = new File(backups, destName);
37+
File destZip = new File(backups, destName);
3838

39-
CompressUtils.forceZip(rbdata, dest, pathname -> {
39+
CompressUtils.forceZip(destZip, rbdata, pathname -> {
4040
String name = pathname.getName();
4141
return !("_backups".equals(name) || "_log".equals(name) || "temp".equals(name) || "rebuild.pid".equals(name));
4242
});
4343

44-
log.info("Backup succeeded : {} ({})", dest, FileUtils.byteCountToDisplaySize(dest.length()));
44+
log.info("Backup succeeded : {} ({})", destZip, FileUtils.byteCountToDisplaySize(destZip.length()));
4545

46-
return dest;
46+
return destZip;
4747
}
4848
}

src/main/java/com/rebuild/utils/CompressUtils.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ public static void forceZip(File destZip, File fileOrDir, FileFilter filter) thr
4848
/**
4949
* Creates a zip output stream at the specified path with the contents of the specified directory.
5050
*
51-
* @param zipOutputStream
51+
* @param destZipOutputStream
5252
* @param fileOrDir
5353
* @param filter
5454
* @throws IOException
5555
*/
56-
public static void zip(OutputStream zipOutputStream, File fileOrDir, FileFilter filter) throws IOException {
56+
public static void zip(OutputStream destZipOutputStream, File fileOrDir, FileFilter filter) throws IOException {
5757
BufferedOutputStream bufferedOutputStream = null;
5858
ZipArchiveOutputStream zipArchiveOutputStream = null;
5959

6060
try {
61-
bufferedOutputStream = new BufferedOutputStream(zipOutputStream);
61+
bufferedOutputStream = new BufferedOutputStream(destZipOutputStream);
6262
zipArchiveOutputStream = new ZipArchiveOutputStream(bufferedOutputStream);
6363

6464
addFileToZip(zipArchiveOutputStream, fileOrDir, null, filter);
@@ -70,7 +70,7 @@ public static void zip(OutputStream zipOutputStream, File fileOrDir, FileFilter
7070
}
7171

7272
IOUtils.closeQuietly(bufferedOutputStream);
73-
IOUtils.closeQuietly(zipOutputStream);
73+
IOUtils.closeQuietly(destZipOutputStream);
7474
}
7575
}
7676

@@ -85,12 +85,12 @@ public static void forceZip(File destZip, File... files) throws IOException {
8585
FileUtils.deleteQuietly(destZip);
8686
}
8787

88-
OutputStream zipOutputStream = Files.newOutputStream(destZip.toPath());
88+
OutputStream destZipOutputStream = Files.newOutputStream(destZip.toPath());
8989
BufferedOutputStream bufferedOutputStream = null;
9090
ZipArchiveOutputStream zipArchiveOutputStream = null;
9191

9292
try {
93-
bufferedOutputStream = new BufferedOutputStream(zipOutputStream);
93+
bufferedOutputStream = new BufferedOutputStream(destZipOutputStream);
9494
zipArchiveOutputStream = new ZipArchiveOutputStream(bufferedOutputStream);
9595

9696
for (File file : files) {
@@ -104,7 +104,7 @@ public static void forceZip(File destZip, File... files) throws IOException {
104104
}
105105

106106
IOUtils.closeQuietly(bufferedOutputStream);
107-
IOUtils.closeQuietly(zipOutputStream);
107+
IOUtils.closeQuietly(destZipOutputStream);
108108
}
109109

110110
}

src/test/java/com/rebuild/utils/CompressUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class CompressUtilsTest {
1919
@Test
2020
void zip() throws IOException {
2121
CompressUtils.forceZip(
22-
new File("D:\\GitHub\\rebuild\\rebuild"),
2322
new File("D:\\GitHub\\rebuild.zip"),
23+
new File("D:\\GitHub\\rebuild\\rebuild"),
2424
pathname -> !pathname.getName().contains("node_modules")
2525
);
2626
}

0 commit comments

Comments
 (0)