Skip to content

Commit 4c54f8d

Browse files
tomas-sexeniananaiberta
authored andcommitted
Correct parameters data types
(cherry picked from commit c8c7890)
1 parent 60d2c27 commit 4c54f8d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gxcompress/src/main/java/com/genexus/compression/Compression.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,25 @@ public void setFormat(String format) {
3030
this.format = format;
3131
}
3232

33-
public void addFile(File file) {
33+
public void addFile(String filePath) {
34+
File file = new File(filePath);
3435
if (file.exists()) {
3536
filesToCompress.add(file);
3637
} else {
3738
log.error("File does not exist: {}", file.getAbsolutePath());
3839
}
3940
}
4041

41-
public void addFolder(File folder) {
42+
public void addFolder(String folderPath) {
43+
File folder = new File(folderPath);
4244
if (folder.exists() && folder.isDirectory()) {
4345
File[] files = folder.listFiles();
4446
if (files != null) {
4547
for (File file : files) {
4648
if (file.isDirectory()) {
47-
addFolder(file);
49+
addFolder(file.getAbsolutePath());
4850
} else {
49-
addFile(file);
51+
addFile(file.getAbsolutePath());
5052
}
5153
}
5254
}

0 commit comments

Comments
 (0)