Skip to content

Commit 93c4291

Browse files
committed
fix: check if output file already exists
1 parent 8c5ce57 commit 93c4291

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/sub/optimal/hacklace2/TemplateProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void processTemplateFile(File template) throws IOException {
7171
int indexLastDot = templateFileName.lastIndexOf(".");
7272
String baseName = templateFileName.substring(0, indexLastDot < 0 ? templateFileName.length() : indexLastDot);
7373
File hacklaceFile = new File(baseName + ".hl");
74-
if (FileUtil.isReadableFile(hacklaceFile)) {
74+
if (hacklaceFile.exists()) {
7575
System.err.println(String.format("%s: output file already exist", hacklaceFile.getName()));
7676
return;
7777
}

0 commit comments

Comments
 (0)