diff -r c9c830897547 -r 7f86e7ad378b hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Wed Feb 10 17:15:10 2010 +0000 +++ b/hedgewars/uMisc.pas Wed Feb 10 17:31:12 2010 +0000 @@ -740,15 +740,9 @@ begin assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt'); rewrite(f); - if IOResult = 5 then - begin - // prevent writing on a directory you do not have permissions on - // should be safe to assume the current directory is writable - assign(f, './debug' + inttostr(i) + '.txt'); - rewrite(f); - end; if IOResult = 0 then break; end; + if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr {$ENDIF} {$I+} {$ENDIF}