소스 검색

* Use /data/local/tmp/ as a fallback temp dir on Android.

git-svn-id: trunk@31720 -
yury 10 년 전
부모
커밋
6f15b5bf63
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      rtl/unix/sysutils.pp

+ 8 - 1
rtl/unix/sysutils.pp

@@ -1484,7 +1484,14 @@ begin
     If (Result='') Then
       Result:=GetEnvironmentVariable('TMPDIR');
     if (Result='') then
-      Result:='/tmp/' // fallback.
+      begin
+      // fallback.
+      {$ifdef android}
+        Result:='/data/local/tmp/';
+      {$else}
+        Result:='/tmp/';
+      {$endif android}
+      end;
     end;
   if (Result<>'') then
     Result:=IncludeTrailingPathDelimiter(Result);