fix(library/init/lean/path): user normalizePathSeparators at moduleNameOfFileName
This commit is contained in:
parent
17e5f0b719
commit
1d0d65893b
1 changed files with 1 additions and 1 deletions
|
|
@ -106,7 +106,7 @@ do fname ← IO.realPath (System.FilePath.normalizePathSeparators fname);
|
|||
def moduleNameOfFileName (fname : String) : IO Name :=
|
||||
do
|
||||
path ← findAtSearchPath fname;
|
||||
fname ← IO.realPath fname;
|
||||
fname ← IO.realPath (System.FilePath.normalizePathSeparators fname);
|
||||
let fnameSuffix := fname.drop path.length;
|
||||
let fnameSuffix := if fnameSuffix.get 0 == pathSeparator then fnameSuffix.drop 1 else fnameSuffix;
|
||||
if path ++ pathSep ++ fnameSuffix != fname then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue