diff options
author | Erich Eckner <git@eckner.net> | 2017-08-14 11:26:41 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-08-14 11:26:41 +0200 |
commit | 4f9953460f120c50fb15173c50f544dcbe8a2c31 (patch) | |
tree | 8360f970322603f66943ffade218ab4a2eec99c3 /systemunit.pas | |
parent | de3e51becaddd350dc550d7ca828e125c3361e5d (diff) | |
download | units-4f9953460f120c50fb15173c50f544dcbe8a2c31.tar.xz |
systemunit.pas: shellExpand ersetzt nun auch "~"
Diffstat (limited to 'systemunit.pas')
-rw-r--r-- | systemunit.pas | 10 |
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; |