Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document possible failures of removing directories on Windows #108

Merged
merged 4 commits into from
Jun 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions System/Directory.hs
Original file line number Diff line number Diff line change
@@ -402,6 +402,9 @@ removeDirectory = removePathInternal True
-- symbolic links are removed without affecting their targets.
--
-- On Windows, the operation fails if /dir/ is a directory symbolic link.
--
-- This operation is reported to be flaky on Windows so retry logic may
-- be advisable. See: https://github.com/haskell/directory/pull/108
removeDirectoryRecursive :: FilePath -> IO ()
removeDirectoryRecursive path =
(`ioeAddLocation` "removeDirectoryRecursive") `modifyIOError` do
@@ -418,6 +421,9 @@ removeDirectoryRecursive path =
-- | @removePathRecursive path@ removes an existing file or directory at
-- /path/ together with its contents and subdirectories. Symbolic links are
-- removed without affecting their the targets.
--
-- This operation is reported to be flaky on Windows so retry logic may
-- be advisable. See: https://github.com/haskell/directory/pull/108
removePathRecursive :: FilePath -> IO ()
removePathRecursive path =
(`ioeAddLocation` "removePathRecursive") `modifyIOError` do
@@ -430,6 +436,9 @@ removePathRecursive path =
-- | @removeContentsRecursive dir@ removes the contents of the directory
-- /dir/ recursively. Symbolic links are removed without affecting their the
-- targets.
--
-- This operation is reported to be flaky on Windows so retry logic may
-- be advisable. See: https://github.com/haskell/directory/pull/108
removeContentsRecursive :: FilePath -> IO ()
removeContentsRecursive path =
(`ioeAddLocation` "removeContentsRecursive") `modifyIOError` do