Fix bug 329908: Throw exception if file can't be read in readFile()
git-svn-id: svn://10.0.0.236/trunk@255040 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1037,7 +1037,11 @@ public class Global extends ImporterTopLevel
|
||||
}
|
||||
} else {
|
||||
File f = new File(filePath);
|
||||
|
||||
if (!f.exists()) {
|
||||
throw new FileNotFoundException("File not found: " + filePath);
|
||||
} else if (!f.canRead()) {
|
||||
throw new IOException("Cannot read file: " + filePath);
|
||||
}
|
||||
long length = f.length();
|
||||
chunkLength = (int)length;
|
||||
if (chunkLength != length)
|
||||
|
||||
Reference in New Issue
Block a user