瀏覽代碼

Fix root path resolution on PCK file

George Marques 9 年之前
父節點
當前提交
1d759f02e6
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      core/io/file_access_pack.cpp

+ 2 - 0
core/io/file_access_pack.cpp

@@ -398,6 +398,8 @@ Error DirAccessPack::change_dir(String p_dir) {
 
 	nd = nd.simplify_path();
 
+	if (nd == "") nd = ".";
+
 	if (nd.begins_with("/")) {
 		nd = nd.replace_first("/", "");
 		absolute = true;