소스 검색

allow explicit path for local storage directory

Nicolas Cannasse 1 년 전
부모
커밋
c00eff2039
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      hxd/fs/LocalFileSystem.hx

+ 2 - 2
hxd/fs/LocalFileSystem.hx

@@ -245,7 +245,7 @@ class LocalFileSystem implements FileSystem {
 	static var isWindows = Sys.systemName() == "Windows";
 	public static var FILES_CHECK_MAX = 5;
 
-	public function new( dir : String, configuration : String ) {
+	public function new( dir : String, configuration : String, ?storagePath ) {
 		baseDir = dir;
 		if( configuration == null )
 			configuration = "default";
@@ -253,7 +253,7 @@ class LocalFileSystem implements FileSystem {
 		#if macro
 		var exePath = null;
 		#else
-		var pr = Sys.programPath();
+		var pr = storagePath != null ? storagePath : Sys.programPath();
 		var exePath = pr == null ? null : pr.split("\\").join("/").split("/");
 		#end