[darcs-devel] [patch1749] fix in patch index: use removeFile, not ... (and 6 more)
Ben Franksen
bugs at darcs.net
Tue Nov 20 03:48:44 UTC 2018
Ben Franksen <ben.franksen at online.de> added the comment:
>> * fix in patch index: use removeFile, not
> removeDirectoryRecursive to remove noPatchIndex
>
>> - removeDirectoryRecursive (repodir </> darcsdir </>
> noPatchIndex) `catch` \(_ :: IOError) -> return ()
>> + removeFile (repodir </> darcsdir </> noPatchIndex) `catch` \(_
> :: IOError) -> return ()
>
> Fine. Might be nice to make the catch more limited than any IOError,
> or to check for problems up-front.
Checking for problematic conditions up front is prone to race
conditions. This is why it is generally recommended to just run the
action and catch errors. We could print a warning to stderr, though,
instead of completely ignoring the error.
Do you have a suggestion to what kind of IO errors to limit the catch?
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1749>
__________________________________
More information about the darcs-devel
mailing list