Compare commits
2 Commits
3a4e2f160f
...
eda96d5ed2
| Author | SHA1 | Date | |
|---|---|---|---|
| eda96d5ed2 | |||
| e8555f7992 |
@ -226,6 +226,8 @@ public class Utils {
|
||||
"THREAT_DETECTED on File " + file.fileName() + " is infected: " + result.getMessage());
|
||||
}
|
||||
}
|
||||
File f = file.filePath().toFile();
|
||||
System.out.println(f.exists() + " - " + f);
|
||||
|
||||
// File is clean - now we can safely process it
|
||||
LOGGER.infof("File is clean: %s (size=%d) (contentType=%s)", file.fileName(), file.size(),
|
||||
@ -244,14 +246,14 @@ public class Utils {
|
||||
FilenameFilter filter = (directory, filename) -> filename.startsWith(id + ".");
|
||||
File[] files = dirFile.listFiles(filter);
|
||||
if (files != null) {
|
||||
for (File f : files) {
|
||||
for (File f2 : files) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
f.delete();
|
||||
f2.delete();
|
||||
}
|
||||
}
|
||||
|
||||
File f = file.filePath().toFile();
|
||||
System.out.println(f + " -> " + new File(dirFile, id + "." + detectedExtensions[0]));
|
||||
System.out.println(
|
||||
f.exists() + " - " + f + " -> " + new File(dirFile, id + "." + detectedExtensions[0]));
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
System.out.println(f.renameTo(new File(dirFile, id + "." + detectedExtensions[0])));
|
||||
return "ok";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user