summaryrefslogtreecommitdiff
path: root/ide/wutils.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
commit1903b037de2fb3e75826406b46f055acb70963fa (patch)
tree604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /ide/wutils.pas
parentad1141d52f8353457053b925cd674fe1d5c4eafc (diff)
parent953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff)
downloadfpc-blocks.tar.gz
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'ide/wutils.pas')
-rw-r--r--ide/wutils.pas12
1 files changed, 10 insertions, 2 deletions
diff --git a/ide/wutils.pas b/ide/wutils.pas
index 4e890a1994..e7242bc385 100644
--- a/ide/wutils.pas
+++ b/ide/wutils.pas
@@ -514,7 +514,11 @@ function DirOf(const S: string): string;
var D: DirStr; E: ExtStr; N: NameStr;
begin
FSplit(S,D,N,E);
- if (D<>'') and (D[Length(D)]<>DirSep) then
+ if (D<>'') and (D[Length(D)]<>DirSep)
+ {$ifdef HASAMIGA}
+ and (D[Length(D)]<>DriveSeparator)
+ {$endif}
+ then
DirOf:=D+DirSep
else
DirOf:=D;
@@ -1220,7 +1224,11 @@ function GetCurDir: string;
var S: string;
begin
GetDir(0,S);
+{$ifdef HASAMIGA}
+ if (copy(S,length(S),1)<>DirSep) and (copy(S,length(S),1)<>DriveSeparator) then S:=S+DirSep;
+{$else}
if copy(S,length(S),1)<>DirSep then S:=S+DirSep;
+{$endif}
GetCurDir:=S;
end;
@@ -1233,7 +1241,7 @@ var Dir: string;
begin
Dir:=GetEnv('TEMP');
if Dir='' then Dir:=GetEnv('TMP');
-{$if defined(morphos) or defined(amiga)}
+{$ifdef HASAMIGA}
if Dir='' then Dir:='T:';
{$endif}
if (Dir<>'') then if not ExistsDir(Dir) then Dir:='';