Skip to content

Commit

Permalink
haskell#47, reformat badElements so it's easier to see what they are
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Dec 22, 2015
1 parent e1eaaff commit 63eaad2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion System/FilePath/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,12 @@ normaliseDrive drive = if isJust $ readDriveLetter x2
-- Information for validity functions on Windows. See [1].
badCharacters :: [Char]
badCharacters = ":*?><|\""

badElements :: [FilePath]
badElements = ["CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "CLOCK$"]
badElements =
["CON","PRN","AUX","NUL","CLOCK$"
,"COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9"
,"LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9"]


-- | Is a FilePath valid, i.e. could you create a file like it? This function checks for invalid names,
Expand Down

0 comments on commit 63eaad2

Please sign in to comment.