File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
gxcompress/src/main/java/com/genexus/compression Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,23 +30,25 @@ public void setFormat(String format) {
30
30
this .format = format ;
31
31
}
32
32
33
- public void addFile (File file ) {
33
+ public void addFile (String filePath ) {
34
+ File file = new File (filePath );
34
35
if (file .exists ()) {
35
36
filesToCompress .add (file );
36
37
} else {
37
38
log .error ("File does not exist: {}" , file .getAbsolutePath ());
38
39
}
39
40
}
40
41
41
- public void addFolder (File folder ) {
42
+ public void addFolder (String folderPath ) {
43
+ File folder = new File (folderPath );
42
44
if (folder .exists () && folder .isDirectory ()) {
43
45
File [] files = folder .listFiles ();
44
46
if (files != null ) {
45
47
for (File file : files ) {
46
48
if (file .isDirectory ()) {
47
- addFolder (file );
49
+ addFolder (file . getAbsolutePath () );
48
50
} else {
49
- addFile (file );
51
+ addFile (file . getAbsolutePath () );
50
52
}
51
53
}
52
54
}
You can’t perform that action at this time.
0 commit comments