monkey task: always log to userpath
authorsheepluva
Fri, 09 Sep 2011 21:31:39 +0200
changeset 5831 80f2a44becea
parent 5830 ea4d1fe665d7
child 5832 f730c8a9777b
monkey task: always log to userpath
hedgewars/uUtils.pas
--- a/hedgewars/uUtils.pas	Fri Sep 09 20:17:50 2011 +0200
+++ b/hedgewars/uUtils.pas	Fri Sep 09 21:31:39 2011 +0200
@@ -341,20 +341,7 @@
     Assign(f,'../Documents/hw-' + cLogfileBase + '.log');
     Rewrite(f);
 {$ELSE}
-    if (ParamStr(1) <> '') and (ParamStr(2) <> '') then
-        if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then
-        begin
-            i:= 0;
-            while(i < 7) do
-            begin
-                assign(f, ExtractFileDir(ParamStr(2)) + '/' + cLogfileBase + inttostr(i) + '.log');
-                rewrite(f);
-                if IOResult = 0 then break;
-                inc(i)
-            end;
-            if i = 7 then f:= stderr; // if everything fails, write to stderr
-        end
-        else
+    if (UserPathPrefix <> '') then
         begin
             i:= 0;
             while(i < 7) do