Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2974d3152 | ||
|
|
dbee82c69b | ||
|
|
05271c94af | ||
|
|
9d357b24c8 | ||
|
|
62c681819c |
@@ -1,3 +1,5 @@
|
||||
0.5.7:
|
||||
* Fix haddock problem.
|
||||
0.5.6:
|
||||
* Reject only .. and .
|
||||
0.5.5:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: path
|
||||
version: 0.5.6
|
||||
version: 0.5.7
|
||||
synopsis: Support for well-typed paths
|
||||
description: Support for will-typed paths.
|
||||
license: BSD3
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE EmptyDataDecls #-}
|
||||
|
||||
-- | A normalizing well-typed path type.
|
||||
|
||||
module Path
|
||||
(-- * Types
|
||||
Path
|
||||
@@ -134,7 +132,6 @@ parseAbsFile filepath =
|
||||
not ("~/" `isPrefixOf` filepath) &&
|
||||
not (hasParentDir filepath) &&
|
||||
not (null (normalizeFile filepath)) &&
|
||||
filepath /= "." && filepath /= ".." &&
|
||||
FilePath.isValid filepath
|
||||
then return (Path (normalizeFile filepath))
|
||||
else throwM (InvalidAbsFile filepath)
|
||||
|
||||
@@ -156,7 +156,7 @@ parseRelDirSpec =
|
||||
failing "///foo//bar//mu/"
|
||||
failing "///foo//bar////mu"
|
||||
failing "///foo//bar/.//mu"
|
||||
succeeding "..." (Path "...")
|
||||
succeeding "..." (Path ".../")
|
||||
succeeding "foo.bak" (Path "foo.bak/")
|
||||
succeeding "./foo" (Path "foo/")
|
||||
succeeding "././foo" (Path "foo/")
|
||||
@@ -177,7 +177,7 @@ parseAbsFileSpec =
|
||||
failing "/"
|
||||
failing "//"
|
||||
failing "///foo//bar//mu/"
|
||||
succeeding "..." (Path "...")
|
||||
succeeding "/..." (Path "/...")
|
||||
succeeding "/foo.txt" (Path "/foo.txt")
|
||||
succeeding "///foo//bar////mu.txt" (Path "/foo/bar/mu.txt")
|
||||
succeeding "///foo//bar/.//mu.txt" (Path "/foo/bar/mu.txt")
|
||||
|
||||
Reference in New Issue
Block a user