packages/filepath.git
4 years agoOptimise isPathSeparator
Neil Mitchell [Mon, 10 Nov 2014 11:15:23 +0000 (11:15 +0000)] 
Optimise isPathSeparator

4 years ago#11, give better section titles
Neil Mitchell [Mon, 10 Nov 2014 11:15:11 +0000 (11:15 +0000)] 
#11, give better section titles

4 years ago#11, more top-level documentation
Neil Mitchell [Mon, 10 Nov 2014 11:14:51 +0000 (11:14 +0000)] 
#11, more top-level documentation

4 years agoIf there is an error, show the messages again at the end, so you don't have to scroll...
Neil Mitchell [Mon, 10 Nov 2014 11:05:56 +0000 (11:05 +0000)] 
If there is an error, show the messages again at the end, so you don't have to scroll back

4 years agoNote that any is a Prelude function
Neil Mitchell [Mon, 10 Nov 2014 11:05:31 +0000 (11:05 +0000)] 
Note that any is a Prelude function

4 years ago#9, add -<.> as an alias for replaceExtension
Neil Mitchell [Mon, 10 Nov 2014 07:33:44 +0000 (07:33 +0000)] 
#9, add -<.> as an alias for replaceExtension

4 years agoRequire GHC Head to pass
Neil Mitchell [Tue, 4 Nov 2014 20:18:16 +0000 (20:18 +0000)] 
Require GHC Head to pass

4 years agoTry making the travis script work even after you break directory
Neil Mitchell [Tue, 4 Nov 2014 20:02:27 +0000 (20:02 +0000)] 
Try making the travis script work even after you break directory

4 years agoDon't use Extra in the travis script, since filepath is required by extra
Neil Mitchell [Tue, 4 Nov 2014 19:21:35 +0000 (19:21 +0000)] 
Don't use Extra in the travis script, since filepath is required by extra

4 years agoAdd a note that TestGen is generated
Neil Mitchell [Mon, 3 Nov 2014 15:51:14 +0000 (15:51 +0000)] 
Add a note that TestGen is generated

4 years agoImprove the generator
Neil Mitchell [Mon, 3 Nov 2014 15:50:17 +0000 (15:50 +0000)] 
Improve the generator

4 years agoImprove the formatting of the generated code, makes the messages more pleasant
Neil Mitchell [Mon, 3 Nov 2014 15:50:08 +0000 (15:50 +0000)] 
Improve the formatting of the generated code, makes the messages more pleasant

4 years agoSupport :go taking a numeric argument
Neil Mitchell [Mon, 3 Nov 2014 15:49:50 +0000 (15:49 +0000)] 
Support :go taking a numeric argument

4 years agoTurn off chatty tests, otherwise we exceed the travis size limit
Neil Mitchell [Mon, 3 Nov 2014 10:57:17 +0000 (10:57 +0000)] 
Turn off chatty tests, otherwise we exceed the travis size limit

4 years ago#37, let the generator take an argument of the number of tests
Neil Mitchell [Mon, 3 Nov 2014 10:50:14 +0000 (10:50 +0000)] 
#37, let the generator take an argument of the number of tests

4 years ago#37, rewrite the generator
Neil Mitchell [Mon, 3 Nov 2014 10:44:17 +0000 (10:44 +0000)] 
#37, rewrite the generator

4 years agoAdd newtypes for valid paths on Windows and Posix, make sure to be smart about shrink...
Neil Mitchell [Sun, 2 Nov 2014 22:00:38 +0000 (22:00 +0000)] 
Add newtypes for valid paths on Windows and Posix, make sure to be smart about shrinking with valid function

4 years agoAdd an explicit export list to the generator
Neil Mitchell [Sun, 2 Nov 2014 21:48:13 +0000 (21:48 +0000)] 
Add an explicit export list to the generator

4 years agoRemove the QChar type, rewrite an arbitraryFilePath type
Neil Mitchell [Sun, 2 Nov 2014 21:47:09 +0000 (21:47 +0000)] 
Remove the QChar type, rewrite an arbitraryFilePath type

4 years agoMake off the things in the generator which are utilities
Neil Mitchell [Sun, 2 Nov 2014 21:46:30 +0000 (21:46 +0000)] 
Make off the things in the generator which are utilities

4 years agoMerge pull request #36 from thomie/searchPath
Neil Mitchell [Sat, 1 Nov 2014 19:12:52 +0000 (19:12 +0000)] 
Merge pull request #36 from thomie/searchPath

Remove double quotes around searchPath elements on Windows

4 years agoRemove double quotes around searchPath elements on Windows
Thomas Miedema [Sat, 1 Nov 2014 17:39:42 +0000 (18:39 +0100)] 
Remove double quotes around searchPath elements on Windows

4 years agoMerge pull request #35 from thomie/splitExtensions
Neil Mitchell [Sat, 1 Nov 2014 13:08:40 +0000 (13:08 +0000)] 
Merge pull request #35 from thomie/splitExtensions

Refactor and fix test for splitExtension(s)

4 years agoRefactor: don't use reverse explicitly (#6)
Thomas Miedema [Sat, 1 Nov 2014 12:32:37 +0000 (13:32 +0100)] 
Refactor: don't use reverse explicitly (#6)

I couldn't decide between the different implementations of dropWhileEnd and
takeWhileEnd from https://ghc.haskell.org/trac/ghc/ticket/9623#comment:7, so I
choose the simplest solution using two times reverse instead of foldr. See
also:
https://www.haskell.org/pipermail/libraries/2014-September/023835.html

4 years agoAdd 'Valid x =>' to splitExtension(s) QuickCheck property (#34)
Thomas Miedema [Fri, 31 Oct 2014 22:52:26 +0000 (23:52 +0100)] 
Add 'Valid x =>' to splitExtension(s) QuickCheck property (#34)

4 years agoCleanup: explicit is better than implicit
Thomas Miedema [Fri, 31 Oct 2014 22:50:04 +0000 (23:50 +0100)] 
Cleanup: explicit is better than implicit

4 years agoRemove the Expr constructor from the Generate module
Neil Mitchell [Wed, 29 Oct 2014 09:27:20 +0000 (09:27 +0000)] 
Remove the Expr constructor from the Generate module

4 years agoAlways generate test, and always use quickCheck even for constant values
Neil Mitchell [Wed, 29 Oct 2014 09:22:44 +0000 (09:22 +0000)] 
Always generate test, and always use quickCheck even for constant values

4 years agoOnly write out a new generated file if it has changed
Neil Mitchell [Wed, 29 Oct 2014 09:19:18 +0000 (09:19 +0000)] 
Only write out a new generated file if it has changed

4 years agoAd a new Test module to sit in front of the generated tests, move the generate code...
Neil Mitchell [Wed, 29 Oct 2014 09:13:36 +0000 (09:13 +0000)] 
Ad a new Test module to sit in front of the generated tests, move the generate code to TestGen

4 years agoRename AutoTest to TestUtil
Neil Mitchell [Wed, 29 Oct 2014 08:31:02 +0000 (08:31 +0000)] 
Rename AutoTest to TestUtil

4 years agoRemove missing imports from AutoTest
Neil Mitchell [Wed, 29 Oct 2014 08:28:11 +0000 (08:28 +0000)] 
Remove missing imports from AutoTest

4 years agoFix up the .ghci file so it loads the tests
Neil Mitchell [Wed, 29 Oct 2014 08:28:02 +0000 (08:28 +0000)] 
Fix up the .ghci file so it loads the tests

4 years agoChange the generated file to be in module Test
Neil Mitchell [Wed, 29 Oct 2014 08:27:15 +0000 (08:27 +0000)] 
Change the generated file to be in module Test

4 years agoSimplify the :docs_ target
Neil Mitchell [Wed, 29 Oct 2014 08:22:18 +0000 (08:22 +0000)] 
Simplify the :docs_ target

4 years agoUse W and P for the qualifications in ghci, so its test suite compatible
Neil Mitchell [Wed, 29 Oct 2014 08:22:04 +0000 (08:22 +0000)] 
Use W and P for the qualifications in ghci, so its test suite compatible

4 years agoLoad the generator into ghci
Neil Mitchell [Wed, 29 Oct 2014 08:21:47 +0000 (08:21 +0000)] 
Load the generator into ghci

4 years agoRename FilePath_Test to Test
Neil Mitchell [Wed, 29 Oct 2014 08:10:34 +0000 (08:10 +0000)] 
Rename FilePath_Test to Test

4 years agoDelete all the GHC test suite stuff, FilePath is now GHC test-suite free
Neil Mitchell [Wed, 29 Oct 2014 08:08:05 +0000 (08:08 +0000)] 
Delete all the GHC test suite stuff, FilePath is now GHC test-suite free

4 years agoBasic generator cleanups
Neil Mitchell [Wed, 29 Oct 2014 08:04:26 +0000 (08:04 +0000)] 
Basic generator cleanups

4 years agoChange the generator to write a file with Unix line endings on all platforms
Neil Mitchell [Wed, 29 Oct 2014 08:02:59 +0000 (08:02 +0000)] 
Change the generator to write a file with Unix line endings on all platforms

4 years agoAdd a travis.hs script to ensure the generator ran
Neil Mitchell [Wed, 29 Oct 2014 08:01:04 +0000 (08:01 +0000)] 
Add a travis.hs script to ensure the generator ran

4 years agoUpdate the tested-with line to what we currently test against
Neil Mitchell [Wed, 29 Oct 2014 08:00:48 +0000 (08:00 +0000)] 
Update the tested-with line to what we currently test against

4 years agoMove to the neil standard test
Neil Mitchell [Wed, 29 Oct 2014 08:00:28 +0000 (08:00 +0000)] 
Move to the neil standard test

4 years agoRemove the really old GHC tests, no longer interesting (although no intention of...
Neil Mitchell [Wed, 29 Oct 2014 07:32:26 +0000 (07:32 +0000)] 
Remove the really old GHC tests, no longer interesting (although no intention of breaking it)

4 years agoMove the generator
Neil Mitchell [Wed, 29 Oct 2014 07:31:51 +0000 (07:31 +0000)] 
Move the generator

4 years agoSince the generated code is checked in, no need to run the generator
Neil Mitchell [Wed, 29 Oct 2014 07:31:28 +0000 (07:31 +0000)] 
Since the generated code is checked in, no need to run the generator

4 years agoCheck in the filepath tests
Neil Mitchell [Wed, 29 Oct 2014 07:26:04 +0000 (07:26 +0000)] 
Check in the filepath tests

4 years agoReformat and make everything consistent, don't quote \, or it gets too confusing
Neil Mitchell [Tue, 28 Oct 2014 21:42:36 +0000 (21:42 +0000)] 
Reformat and make everything consistent, don't quote \, or it gets too confusing

4 years agoMerge pull request #33 from thomie/arbitrary
Neil Mitchell [Tue, 28 Oct 2014 20:53:46 +0000 (20:53 +0000)] 
Merge pull request #33 from thomie/arbitrary

Remove "|bcd123" from character set for tests (#15)

4 years agoRemove "|bcd123" from character set for tests (#15)
Thomas Miedema [Tue, 28 Oct 2014 20:17:38 +0000 (21:17 +0100)] 
Remove "|bcd123" from character set for tests (#15)

4 years agoMerge pull request #32 from thomie/unc
Neil Mitchell [Tue, 28 Oct 2014 20:05:49 +0000 (20:05 +0000)] 
Merge pull request #32 from thomie/unc

Bug fix: isValid "\\\\?\\D:file" == False

4 years agoPut "Valid x =>" constraint on joinDrive QuickCheck property
Thomas Miedema [Tue, 28 Oct 2014 18:57:32 +0000 (19:57 +0100)] 
Put "Valid x =>" constraint on joinDrive QuickCheck property

Counterexample:

    $ let x = "\\\\?\\D:file"
    $ splitDrive x
    ("\\\\?\\D:","file")
    $ uncurry joinDrive (splitDrive x)
    "\\\\?\\D:\\file"

The "problem" is that the current implementation of splitDrive can sometimes
return invalid drives, such as in the above example. However, if it wouldn't
do so, it would make the implementation of isValid and makeValid more
difficult.

My guideline is currently as follows: splitDrive makes the rough cut of what
is and what isn't a drive, isValid and makeValid finish the job, all other
functions assume drives and paths are valid.

This is also the reason joinDrive (=combineAlways) should not be changed to
not insert the extra slash, solely to handle an invalid path.

4 years agoBug fix: isValid "\\\\?\\D:file" == False
Thomas Miedema [Tue, 28 Oct 2014 18:55:42 +0000 (19:55 +0100)] 
Bug fix: isValid "\\\\?\\D:file" == False

From http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx:

* "A UNC name of any format [is never relative]."

* "You cannot use the "\\?\" prefix with a relative path."

4 years agoRefactor isValid and makeValid
Thomas Miedema [Tue, 28 Oct 2014 18:16:52 +0000 (19:16 +0100)] 
Refactor isValid and makeValid

`head (splitPath path)` is not equal to `takeDrive path` in general:

    head (splitPath "\\foo") == "\\"
    fst (splitDrive "\\foo") == ""

We can do this refactoring because they /are/ equal within the
constraint:

    `length drv >= 2 && all isPathSeparator drv`

4 years agoMerge pull request #31 from thomie/output
Neil Mitchell [Tue, 28 Oct 2014 15:19:35 +0000 (15:19 +0000)] 
Merge pull request #31 from thomie/output

quickSafe: do not call show on already escaped output (#30)

4 years agoquickSafe: do not call show on already escaped output (#30)
Thomas Miedema [Tue, 28 Oct 2014 14:22:35 +0000 (15:22 +0100)] 
quickSafe: do not call show on already escaped output (#30)

This output:

   *** Failed! ... QFilePath "/\\?/a:a"

is much easier to digest than:

   "*** FAILED! ... \NQFILEPATH \"/\\\\?/A:A\"\N"

4 years agoMerge pull request #29 from thomie/bugFixes
Neil Mitchell [Mon, 27 Oct 2014 21:09:33 +0000 (21:09 +0000)] 
Merge pull request #29 from thomie/bugFixes

Bug fixes for normalise #12

4 years agoChange min QuickCheck version back to 2.6 (#28)
Thomas Miedema [Mon, 27 Oct 2014 20:47:05 +0000 (21:47 +0100)] 
Change min QuickCheck version back to 2.6 (#28)

4 years agoRevert "Make splitFileName quickcheck test Posix only" (#14)
Thomas Miedema [Mon, 27 Oct 2014 13:32:26 +0000 (14:32 +0100)] 
Revert "Make splitFileName quickcheck test Posix only" (#14)

This reverts commit 0dd40adf8d4a8a3f409f3a877dba2ae7e98a5c5b.

4 years agoBug fix: normalise "C:.\\" == "C:"
Thomas Miedema [Mon, 27 Oct 2014 18:47:44 +0000 (19:47 +0100)] 
Bug fix: normalise "C:.\\" == "C:"

Another other option would be `normalise "C:.\\" == "C:.\\"`, but this is
nicer since we already have:

> normalise "C:.\\foo"
"C:foo"

4 years agoBug fix: normalise "//home" == "/home" (Posix)
Thomas Miedema [Mon, 27 Oct 2014 17:53:33 +0000 (18:53 +0100)] 
Bug fix: normalise "//home" == "/home" (Posix)

4 years agoBug fix: normalise "/./" == "/" on Posix, "\\" on Windows
Thomas Miedema [Mon, 27 Oct 2014 15:04:48 +0000 (16:04 +0100)] 
Bug fix: normalise "/./" == "/" on Posix, "\\" on Windows

4 years agoMerge pull request #26 from thomie/makeRelative
Neil Mitchell [Mon, 27 Oct 2014 14:40:11 +0000 (14:40 +0000)] 
Merge pull request #26 from thomie/makeRelative

Reenable test #25 and bug fix for makeRelative

4 years agoMerge pull request #21 from thomie/joinDrive-combineAlways
Neil Mitchell [Mon, 27 Oct 2014 13:21:53 +0000 (13:21 +0000)] 
Merge pull request #21 from thomie/joinDrive-combineAlways

Refactor: joinDrive and combineAlways

4 years agoBug fix: on Windows, makeRelative "/" "//" == "//"
Thomas Miedema [Sun, 26 Oct 2014 21:16:00 +0000 (22:16 +0100)] 
Bug fix: on Windows, makeRelative "/" "//" == "//"

4 years agoReenable and fix QuickCheck property for makeRelative (#25)
Thomas Miedema [Sun, 26 Oct 2014 21:13:08 +0000 (22:13 +0100)] 
Reenable and fix QuickCheck property for makeRelative (#25)

Both x and y should be valid.

4 years agojoinDrive=combineAlways
Thomas Miedema [Thu, 23 Oct 2014 17:14:24 +0000 (19:14 +0200)] 
joinDrive=combineAlways

4 years agoRemove unnecessary isDrive check in combineAlways
Thomas Miedema [Thu, 23 Oct 2014 17:09:26 +0000 (19:09 +0200)] 
Remove unnecessary isDrive check in combineAlways

`isWindows && isLetter a1` implies `isDrive [a1, ':']`

4 years agoInline call to joinDrive in combineAlways
Thomas Miedema [Thu, 23 Oct 2014 17:05:53 +0000 (19:05 +0200)] 
Inline call to joinDrive in combineAlways

The first 3 guards of both functions are the same, so copy-paste only the last
guard of joinDrive into combineAlways.

4 years agoInsert slash when first argument to joinDrive does not end with one
Thomas Miedema [Thu, 23 Oct 2014 16:23:56 +0000 (18:23 +0200)] 
Insert slash when first argument to joinDrive does not end with one

Before:
joinDrive "/foo" "bar" == "/foobar"

After:
joinDrive "/foo" "bar" == "/foo/bar"

The first argument to `joinDrive` should arguably always be a drive. On Posix
this means it should be, and thus end with, a single slash. It is currently
undocumented what should happen when it doesn't end with a slash (throw an
exception?). Since it is unlikely anyone is relying on the original behavior,
this change is hopefully ok to make.

The reason for this change is to make `joinDrive` similar in semantics to
`combineAlways`.

4 years agoRefactor: use hasTrailingPathSeparator in joinDrive and combineAlways
Thomas Miedema [Fri, 24 Oct 2014 19:11:09 +0000 (21:11 +0200)] 
Refactor: use hasTrailingPathSeparator in joinDrive and combineAlways

4 years agoAllow multiple "Valid =>" clauses in QuickCheck properties
Thomas Miedema [Sun, 26 Oct 2014 21:12:28 +0000 (22:12 +0100)] 
Allow multiple "Valid =>" clauses in QuickCheck properties

4 years agoMerge branch 'thomie-normalise'
Neil Mitchell [Sun, 26 Oct 2014 21:41:24 +0000 (21:41 +0000)] 
Merge branch 'thomie-normalise'

4 years agoMerge branch 'normalise' of https://github.com/thomie/filepath into thomie-normalise
Neil Mitchell [Sun, 26 Oct 2014 21:41:11 +0000 (21:41 +0000)] 
Merge branch 'normalise' of https://github.com/thomie/filepath into thomie-normalise

Conflicts:
System/FilePath/Internal.hs
changelog.md

4 years ago#24, turn back on the splitDirectories test
Neil Mitchell [Sun, 26 Oct 2014 21:36:43 +0000 (21:36 +0000)] 
#24, turn back on the splitDirectories test

4 years agoMerge pull request #20 from thomie/takeDirectory
Neil Mitchell [Sun, 26 Oct 2014 21:29:18 +0000 (21:29 +0000)] 
Merge pull request #20 from thomie/takeDirectory

Refactor takeDirectory

4 years agoMerge pull request #19 from thomie/splitDirectories
Neil Mitchell [Sun, 26 Oct 2014 21:24:14 +0000 (21:24 +0000)] 
Merge pull request #19 from thomie/splitDirectories

Refactor splitDirectories

4 years agoMerge pull request #17 from thomie/fix-isDrive-empty
Neil Mitchell [Sun, 26 Oct 2014 21:21:40 +0000 (21:21 +0000)] 
Merge pull request #17 from thomie/fix-isDrive-empty

Bug fix: isDrive "" == False

4 years agoMerge branch 'thomie-isValid'
Neil Mitchell [Sun, 26 Oct 2014 21:18:44 +0000 (21:18 +0000)] 
Merge branch 'thomie-isValid'

4 years agoMerge branch 'isValid' of https://github.com/thomie/filepath into thomie-isValid
Neil Mitchell [Sun, 26 Oct 2014 21:18:34 +0000 (21:18 +0000)] 
Merge branch 'isValid' of https://github.com/thomie/filepath into thomie-isValid

Conflicts:
changelog.md

4 years agoMerge branch 'master' of https://github.com/haskell/filepath
Neil Mitchell [Sun, 26 Oct 2014 21:12:20 +0000 (21:12 +0000)] 
Merge branch 'master' of https://github.com/haskell/filepath

4 years ago#16, add a specific example of the Windows weirdity
Neil Mitchell [Sun, 26 Oct 2014 21:11:57 +0000 (21:11 +0000)] 
#16, add a specific example of the Windows weirdity

4 years agoMerge pull request #16 from thomie/equalFilePath
Neil Mitchell [Sun, 26 Oct 2014 21:10:29 +0000 (21:10 +0000)] 
Merge pull request #16 from thomie/equalFilePath

Bug fix: equalFilePath "C:\\" "C:" == False

4 years ago#25, comment out another test
Neil Mitchell [Sun, 26 Oct 2014 21:09:44 +0000 (21:09 +0000)] 
#25, comment out another test

4 years ago#16, generalise some equalFilePath tests
Neil Mitchell [Sun, 26 Oct 2014 21:09:23 +0000 (21:09 +0000)] 
#16, generalise some equalFilePath tests

4 years ago#22, comment out a failing test
Neil Mitchell [Sun, 26 Oct 2014 21:00:20 +0000 (21:00 +0000)] 
#22, comment out a failing test

4 years ago#24, comment out a failing test
Neil Mitchell [Sun, 26 Oct 2014 21:00:00 +0000 (21:00 +0000)] 
#24, comment out a failing test

4 years agoChange the .ghci things to run the tests via Cabal - faster
Neil Mitchell [Sun, 26 Oct 2014 20:59:50 +0000 (20:59 +0000)] 
Change the .ghci things to run the tests via Cabal - faster

4 years agoRefactor normalise: simplify propSep
Thomas Miedema [Sun, 14 Sep 2014 22:20:52 +0000 (00:20 +0200)] 
Refactor normalise: simplify propSep

Only when a path on Windows starts with a leading forward slash does propSep
need to do something, all others path separators are properly taken care of by
joinPath.

Add 2 tests to show that splitDirectories can handle superfluous
pathSeparators, and a test to show that (this new version of) propSep is
indeed needed to normalise relative-to-root paths on Windows.

4 years agoBug fix: normalise "//server/test" == "\\\\server\\test"
Thomas Miedema [Sun, 26 Oct 2014 20:19:39 +0000 (21:19 +0100)] 
Bug fix: normalise "//server/test" == "\\\\server\\test"

When drive represents a network share, slashes were not being normalised
properly.

4 years agoBug fix: normalize "\\" == "\\"
Thomas Miedema [Sat, 25 Oct 2014 21:38:17 +0000 (23:38 +0200)] 
Bug fix: normalize "\\" == "\\"

4 years agoAdd a shrink method for QFilePath
Neil Mitchell [Sun, 26 Oct 2014 20:43:28 +0000 (20:43 +0000)] 
Add a shrink method for QFilePath

4 years agoMake sure :test is actually using the new code
Neil Mitchell [Sun, 26 Oct 2014 20:43:16 +0000 (20:43 +0000)] 
Make sure :test is actually using the new code

4 years agoAllow a broader range of QuickCheck
Neil Mitchell [Sun, 26 Oct 2014 20:43:06 +0000 (20:43 +0000)] 
Allow a broader range of QuickCheck

4 years agoRefactor takeDirectory
Thomas Miedema [Thu, 23 Oct 2014 12:17:20 +0000 (14:17 +0200)] 
Refactor takeDirectory

Do not reimplement `dropTrailingPathSeparator`.

4 years agoRemove unnecessary `not . null` check
Thomas Miedema [Thu, 23 Oct 2014 12:14:30 +0000 (14:14 +0200)] 
Remove unnecessary `not . null` check

If `res` and `dir` are both null, it doesn't matter which one we return.

4 years agoCleanup: rename file to dir in takeDirectory
Thomas Miedema [Sun, 14 Sep 2014 18:49:52 +0000 (20:49 +0200)] 
Cleanup: rename file to dir in takeDirectory

4 years agoRefactor splitDirectories
Thomas Miedema [Thu, 23 Oct 2014 10:59:29 +0000 (12:59 +0200)] 
Refactor splitDirectories

Use `dropTrailingPathSeparator` instead of the custom function `g` to remove
trailing path separators from FilePath components generated with `splitPath`.

Since `dropTrailingPathSeparator` does not change FilePath components
for which isDrive is True, it is no longer necessary to handle the first
FilePath component in a special way.

4 years agoBug fix: isValid "\\\\\\foo" == False
Thomas Miedema [Sat, 25 Oct 2014 22:21:24 +0000 (00:21 +0200)] 
Bug fix: isValid "\\\\\\foo" == False

Share name can not start with a slash.