# HG changeset patch
# User unc0rr
# Date 1381689111 -14400
# Node ID 7fcdedc455897f8ab10331062f26a2945c670781
# Parent  9351e96990aebd4eabd0a5d5310829bb6c2f2e7a
Unbreak access to Data dir in profile broken in r8b48c27201af

diff -r 9351e96990ae -r 7fcdedc45589 hedgewars/uPhysFSLayer.pas
--- a/hedgewars/uPhysFSLayer.pas	Sun Oct 13 21:53:42 2013 +0400
+++ b/hedgewars/uPhysFSLayer.pas	Sun Oct 13 22:31:51 2013 +0400
@@ -143,10 +143,14 @@
 
     i:= PHYSFS_mount(Str2PChar(PathPrefix), nil, false);
     AddFileLog('[PhysFS] mount ' + PathPrefix + ': ' + inttostr(i));
-    i:= PHYSFS_mount(Str2PChar(UserPathPrefix + '/'), '/', false);
-    AddFileLog('[PhysFS] mount ' + UserPathPrefix + '/: ' + inttostr(i));
+    i:= PHYSFS_mount(Str2PChar(UserPathPrefix + '/Data'), nil, false);
+    AddFileLog('[PhysFS] mount ' + UserPathPrefix + '/Data: ' + inttostr(i));
 
     hedgewarsMountPackages;
+
+    i:= PHYSFS_mount(Str2PChar(UserPathPrefix), nil, false);
+    // need access to teams and frontend configs (for bindings)
+    AddFileLog('[PhysFS] mount ' + UserPathPrefix + ': ' + inttostr(i)); 
 end;
 
 procedure freeModule;
diff -r 9351e96990ae -r 7fcdedc45589 hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Sun Oct 13 21:53:42 2013 +0400
+++ b/hedgewars/uScript.pas	Sun Oct 13 22:31:51 2013 +0400
@@ -2088,7 +2088,10 @@
 begin
 s:= cPathz[ptData] + name;
 if not pfsExists(s) then
+    begin
+    AddFileLog('[LUA] Script not found: ' + name);
     exit;
+    end;
 
 f:= pfsOpenRead(s);
 if f = nil then