summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-08-14 11:26:41 +0200
committerErich Eckner <git@eckner.net>2017-08-14 11:26:41 +0200
commit4f9953460f120c50fb15173c50f544dcbe8a2c31 (patch)
tree8360f970322603f66943ffade218ab4a2eec99c3
parentde3e51becaddd350dc550d7ca828e125c3361e5d (diff)
downloadunits-4f9953460f120c50fb15173c50f544dcbe8a2c31.tar.xz
systemunit.pas: shellExpand ersetzt nun auch "~"
-rw-r--r--systemunit.pas10
1 files changed, 9 insertions, 1 deletions
diff --git a/systemunit.pas b/systemunit.pas
index cb09456..c99d05a 100644
--- a/systemunit.pas
+++ b/systemunit.pas
@@ -125,7 +125,7 @@ begin
while pos('${',result)>0 do begin
s:=erstesArgument(result,'${',false);
name:=erstesArgument(result,'}',false);
- result:=s+GetEnvironmentVariable(name)+result;
+ result:=s+getEnvironmentVariable(name)+result;
end;
end;
@@ -220,6 +220,14 @@ begin
end
else
inc(i);
+ for i:=0 to sa.count-1 do begin
+ s:=sa[i];
+ if startetMit('~/',s) then
+ s:=getEnvironmentVariable('HOME')+'/'+s
+ else
+ continue;
+ sa[i]:=s;
+ end;
end;
function mkTemp(s: string): string;