Skip to content

Commit 0cdd740

Browse files
committed
second fix to unit test
1 parent 9b9bc23 commit 0cdd740

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/absil/illib.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,13 +983,16 @@ module Shim =
983983
let isInvalidPath(p:string) =
984984
String.IsNullOrEmpty(p) || p.IndexOfAny(System.IO.Path.GetInvalidPathChars()) <> -1
985985

986+
let isInvalidFilename(p:string) =
987+
String.IsNullOrEmpty(p) || p.IndexOfAny(System.IO.Path.GetInvalidFileNameChars()) <> -1
988+
986989
let isInvalidDirectory(d:string) =
987990
d=null || d.IndexOfAny(Path.GetInvalidPathChars()) <> -1
988991

989992
isInvalidPath (path) ||
990993
let directory = Path.GetDirectoryName(path)
991994
let filename = Path.GetFileName(path)
992-
isInvalidDirectory(directory) || isInvalidPath(filename)
995+
isInvalidDirectory(directory) || isInvalidFilename(filename)
993996

994997
member __.GetTempPathShim() = System.IO.Path.GetTempPath()
995998

0 commit comments

Comments
 (0)