Skip to content

Commit f0271d6

Browse files
Fix for #1378
1 parent 26631e4 commit f0271d6

File tree

1 file changed

+4
-1
lines changed
  • src/Runtime/XSharp.Core/Functions

1 file changed

+4
-1
lines changed

src/Runtime/XSharp.Core/Functions/OS.prg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ FUNCTION CurDir() AS STRING
7474
LOCAL cDir AS STRING
7575
LOCAL index AS INT
7676
cDir := System.Environment.CurrentDirectory
77-
index := cDir:IndexOf(Path.VolumeSeparatorChar)
77+
index := cDir:IndexOf(Path.VolumeSeparatorChar)
78+
if cDir:StartsWith("\\")
79+
return cDir
80+
endif
7881
IF index > 0
7982
cDir := cDir:Substring(index+1)
8083
ENDIF

0 commit comments

Comments
 (0)