Skip to content

Commit

Permalink
Expand ~/ in PIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
vwbusguy committed Mar 11, 2023
1 parent a1fc800 commit 248265c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qbsh.bas
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ If args$ = "" Or InStr(args$, "=") < 2 Then
End If
dest$ = Left$(args$, InStr(args$, "=") - 1)
src$ = Right$(args$, Len(args$) - InStr(args$, "="))
If InStr(dest$, "~") = 1 And InStr(dest$, "/") = 2 Then
dest$ = Environ$("HOME") + "/" + Right$(dest$, Len(dest$) - 2)
End If
If InStr(src$, "~") = 1 And InStr(src$, "/") = 2 Then
src$ = Environ$("HOME") + "/" + Right$(src$, Len(src$) - 2)
End If
If Not _FileExists(src$) Then
If _DirExists(src$) Then
Print src$; " is a directory. Only regular files are supported for the source."
Expand Down

0 comments on commit 248265c

Please sign in to comment.