mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
New improvements
This commit is contained in:
parent
863e40ba1c
commit
0abf40fded
@ -37,7 +37,7 @@ public class Main {
|
|||||||
null,
|
null,
|
||||||
lastOvertime == null ? "0:00" : lastOvertime
|
lastOvertime == null ? "0:00" : lastOvertime
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!starttimeTxt.exists()) {
|
if(!starttimeTxt.exists()) {
|
||||||
Utils.writeTextToFile(starttimeTxt, startTime);
|
Utils.writeTextToFile(starttimeTxt, startTime);
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,10 @@ public class Utils {
|
|||||||
*/
|
*/
|
||||||
public static String readTextFromFile(final File file)
|
public static String readTextFromFile(final File file)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
if(!file.exists()) {
|
||||||
|
//nothing to do
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new String(Files.readAllBytes(file.toPath()));
|
return new String(Files.readAllBytes(file.toPath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user