Adjusting start/run warning messages on missing file content.

+ Leaving behavior of missing directories alone.
+ See bug #427204 for old behavior bug
This commit is contained in:
Joakim Erdfelt 2014-10-28 09:35:11 -07:00
parent 9dd0db8eeb
commit 653cb32ede
1 changed files with 18 additions and 7 deletions

View File

@ -727,14 +727,25 @@ public class Main
if (!FS.exists(file))
{
/* Startup should NEVER fail to run on missing content.
* See Bug #427204
*/
// args.setRun(false);
String type=arg.location.endsWith("/")?"directory":"file";
if (arg.uri!=null)
boolean isDir = arg.location.endsWith("/");
if (isDir)
{
StartLog.warn("Required %s '%s' not downloaded from %s. Run with --create-files to download",type,baseHome.toShortForm(file),arg.uri);
System.err.println("MKDIR: " + baseHome.toShortForm(file));
FS.ensureDirectoryExists(file);
/* Startup should not fail to run on missing directories.
* See Bug #427204
*/
// args.setRun(false);
}
else
{
StartLog.warn("Missing Required File: %s",baseHome.toShortForm(file));
args.setRun(false);
if (arg.uri != null)
{
StartLog.warn(" Can be downloaded From: %s",arg.uri);
StartLog.warn(" Run start.jar --create-files to download");
}
}
}
}