Show errors if any directories could not be created. (fixes #97)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -289,11 +289,9 @@ public class Utils {
|
||||
public static void takeScreenShot() {
|
||||
// create the screenshot directory
|
||||
File dir = Options.getScreenshotDir();
|
||||
if (!dir.isDirectory()) {
|
||||
if (!dir.mkdir()) {
|
||||
ErrorHandler.error("Failed to create screenshot directory.", null, false);
|
||||
return;
|
||||
}
|
||||
if (!dir.isDirectory() && !dir.mkdir()) {
|
||||
ErrorHandler.error(String.format("Failed to create screenshot directory at '%s'.", dir.getAbsolutePath()), null, false);
|
||||
return;
|
||||
}
|
||||
|
||||
// create file name
|
||||
|
||||
Reference in New Issue
Block a user