hedgewars/uUtils.pas
changeset 10127 7f29a65aa1e4
parent 10124 aabd1b75d5a3
child 10131 4b4a043111f4
--- a/hedgewars/uUtils.pas	Sun Feb 09 19:00:13 2014 +0100
+++ b/hedgewars/uUtils.pas	Mon Feb 10 00:43:03 2014 +0400
@@ -516,7 +516,7 @@
 {$IFNDEF PAS2C}
     f:= stderr; // if everything fails, write to stderr
 {$ENDIF}
-    if (UserPathPrefix <> '') then
+    if (length(UserPathPrefix) > 0) then
         begin
         {$IFNDEF PAS2C}
         // create directory if it doesn't exist
@@ -527,7 +527,7 @@
         i:= 0;
         while(i < 7) do
             begin
-            assign(f, UserPathPrefix + '/Logs/' + logfileBase + inttostr(i) + '.log');
+            assign(f, shortstring(UserPathPrefix) + '/Logs/' + logfileBase + inttostr(i) + '.log');
             if IOResult = 0 then
                 break;
             inc(i)