Ver Fonte

warning when "res" not found

Nicolas Cannasse há 10 anos atrás
pai
commit
6c08dcc4a8
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      hxd/res/FileTree.hx

+ 2 - 2
hxd/res/FileTree.hx

@@ -44,10 +44,10 @@ class FileTree {
 		}
 		var pos = Context.currentPos();
 		if( resolve )
-			dir = try Context.resolvePath(dir) catch( e : Dynamic ) Context.error("Resource directory not found in classpath '" + dir + "' (use -D resourcesPath=DIR)", pos);
+			dir = try Context.resolvePath(dir) catch( e : Dynamic ) { Context.warning("Resource directory not found in classpath '" + dir + "' (use -D resourcesPath=DIR)", pos); return "__invalid"; }
 		var path = sys.FileSystem.fullPath(dir);
 		if( !sys.FileSystem.exists(path) || !sys.FileSystem.isDirectory(path) )
-			Context.error("Resource directory does not exists '" + path + "'", pos);
+			Context.warning("Resource directory does not exists '" + path + "'", pos);
 		return path;
 	}