New improvements

This commit is contained in:
Robert Vokac 2024-01-27 13:15:48 +00:00
parent 863e40ba1c
commit 0abf40fded
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
2 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public class Main {
null,
lastOvertime == null ? "0:00" : lastOvertime
);
if(!starttimeTxt.exists()) {
Utils.writeTextToFile(starttimeTxt, startTime);
}

View File

@ -49,6 +49,10 @@ public class Utils {
*/
public static String readTextFromFile(final File file)
throws IOException {
if(!file.exists()) {
//nothing to do
return null;
}
return new String(Files.readAllBytes(file.toPath()));
}
}