Commit 06815e3a6a74dc33b70b4607f3b90ebb08d36084

Authored by DarkGod
1 parent e9eb09b2

remove debuf messages

... ... @@ -49,6 +49,10 @@ fs.setPathAllowed(engine.homepath, true)
49 49 fs.setPathAllowed(fs.getRealPath("/addons/"), true)
50 50 if fs.getRealPath("/dlcs/") then fs.setPathAllowed(fs.getRealPath("/dlcs/"), true) end
51 51 fs.setPathAllowed(fs.getRealPath("/modules/"), true)
  52 +
  53 +-- Last resort, add currently mounted paths, as readonly, so taht reset mounts work
  54 +for _, path in ipairs(fs.getSearchPath()) do fs.setPathAllowed(path) end
  55 +
52 56 fs.doneSettingPathAllowed()
53 57 fs.setWritePath(engine.homepath)
54 58
... ...
... ... @@ -398,7 +398,7 @@ static char *sanize_dir_path(const char *dir, size_t len) {
398 398 }
399 399 sdir[si] = '\0';
400 400
401   - printf("===sanitizing '%s' to '%s'\n", dir, sdir);
  401 + // printf("===sanitizing '%s' to '%s'\n", dir, sdir);
402 402 return sdir;
403 403 }
404 404
... ... @@ -450,7 +450,6 @@ bool physfs_check_allow_path_read(lua_State *L, const char *path) {
450 450 char *spath = sanize_dir_path(path, strlen(path));
451 451 int i;
452 452 for (i = 0; i < nb_allowed_dirs_read; i++) {
453   - printf("??READTEST?? '%s' <=> '%s'\n", spath, allowed_dirs_read[i]);
454 453 if (strstr(spath, allowed_dirs_read[i]) == spath) {
455 454 free(spath);
456 455 return TRUE;
... ...
... ... @@ -35,6 +35,12 @@ else
35 35 fs.mount("game", "/", true)
36 36 end
37 37
  38 +fs.setPathAllowed(fs.getRealPath("/engines/"), false)
  39 +fs.setPathAllowed(fs.getRealPath("/thirdparty/"), false)
  40 +fs.setPathAllowed(fs.getRealPath("/addons/"), true)
  41 +if fs.getRealPath("/dlcs/") then fs.setPathAllowed(fs.getRealPath("/dlcs/"), true) end
  42 +fs.setPathAllowed(fs.getRealPath("/modules/"), true)
  43 +
38 44 -- Look for a core
39 45 function get_core(coretype, id)
40 46 coretype = coretype or "te4core"
... ...