Skip to content

Commit

Permalink
Handle file ref with no parent folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jtduffy committed May 10, 2024
1 parent a9b8d5f commit ea1ae83
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class ClearExpiredLogsRunnable implements Runnable {
public ClearExpiredLogsRunnable(int fileCount, String logfile) {
File absoluteLogFilename = new File(logfile);
this.daysToKeepFiles = fileCount;
this.logDirectoryPath = Paths.get(absoluteLogFilename.getParent());
this.logDirectoryPath = absoluteLogFilename.getParent() == null ? Paths.get("./") : Paths.get(absoluteLogFilename.getParent());

String fileNamePrefix = absoluteLogFilename.getName();
pattern = Pattern.compile(fileNamePrefix.replace(".", "\\.")
Expand Down

0 comments on commit ea1ae83

Please sign in to comment.