hedgewars/uMisc.pas
changeset 2693 3207e0eacd43
parent 2691 c0da3a98c01c
child 2697 75880595a9f1
equal deleted inserted replaced
2692:ce9992075118 2693:3207e0eacd43
   586 
   586 
   587 {$IFDEF DEBUGFILE}
   587 {$IFDEF DEBUGFILE}
   588 {$I-}
   588 {$I-}
   589 for i:= 0 to 7 do
   589 for i:= 0 to 7 do
   590 begin
   590 begin
       
   591 {$IFDEF IPHONEDBG}
       
   592 	f:= stderr;
       
   593 {$ELSE}
   591 	assign(f, 
   594 	assign(f, 
   592 {$IFDEF IPHONEOS}
   595   {$IFDEF IPHONEOS}
   593 	string(IPH_getDocumentsPath())
   596 	  string(IPH_getDocumentsPath())
   594 {$ELSE}
   597   {$ELSE}
   595 	ParamStr(1)
   598 	  ParamStr(1)
   596 {$ENDIF}
   599   {$ENDIF}
   597 	+ '/debug' + inttostr(i) + '.txt');
   600 	  + '/debug' + inttostr(i) + '.txt');
   598 //	f:= stderr;
   601 {$ENDIF}
   599 	rewrite(f);
   602 	rewrite(f);
   600 	if IOResult = 5 then
   603 	if IOResult = 5 then
   601 	begin
   604 	begin
   602 		// prevent writing on a directory you do not have permissions on
   605 		// prevent writing on a directory you do not have permissions on
   603 		// should be safe to assume the current directory is writable
   606 		// should be safe to assume the current directory is writable