Add a check in fstick that the reference file exists
This helps avoiding some stupid thinkos. Change-Id: I5b386cd9c6bf0e11f270bb2b8cfaac66ce9b341b
This commit is contained in:
parent
cd61e85fa1
commit
243e14d051
|
@ -371,6 +371,8 @@ public static String lookup(Object l, String nameTemplate,
|
||||||
public static long fsTick(File lastFile) throws InterruptedException,
|
public static long fsTick(File lastFile) throws InterruptedException,
|
||||||
IOException {
|
IOException {
|
||||||
long sleepTime = 1;
|
long sleepTime = 1;
|
||||||
|
if (lastFile != null && !lastFile.exists())
|
||||||
|
throw new FileNotFoundException(lastFile.getPath());
|
||||||
File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
|
File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
|
||||||
try {
|
try {
|
||||||
long startTime = (lastFile == null) ? tmp.lastModified() : lastFile
|
long startTime = (lastFile == null) ? tmp.lastModified() : lastFile
|
||||||
|
|
Loading…
Reference in New Issue