Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup-hs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
ghcup-hs
Commits
2d88b119
There was an error fetching the commit references. Please try again later.
Verified
Commit
2d88b119
authored
3 years ago
by
Julian Ospald
🍵
Browse files
Options
Downloads
Patches
Plain Diff
Fix EXDEV handler on windows wrt #345
parent
6c12dc0d
No related branches found
No related tags found
1 merge request
!246
Fix EXDEV handler on windows wrt #345
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/GHCup/Utils/Prelude.hs
+2
-2
2 additions, 2 deletions
lib/GHCup/Utils/Prelude.hs
with
2 additions
and
2 deletions
lib/GHCup/Utils/Prelude.hs
+
2
−
2
View file @
2d88b119
...
@@ -473,7 +473,7 @@ recyclePathForcibly fp
...
@@ -473,7 +473,7 @@ recyclePathForcibly fp
liftIO
(
moveFile
fp
dest
)
liftIO
(
moveFile
fp
dest
)
`
catch
`
`
catch
`
(
\
e
->
if
|
isDoesNotExistError
e
->
pure
()
(
\
e
->
if
|
isDoesNotExistError
e
->
pure
()
|
isPermissionError
e
{- EXDEV on windows -}
->
recover
(
liftIO
$
removePathForcibly
fp
)
|
isPermissionError
e
||
ioeGetErrorType
e
==
UnsupportedOperation
{- EXDEV on windows -}
->
recover
(
liftIO
$
removePathForcibly
fp
)
|
otherwise
->
throwIO
e
)
|
otherwise
->
throwIO
e
)
`
finally
`
`
finally
`
liftIO
(
handleIO
(
\
_
->
pure
()
)
$
removePathForcibly
tmp
)
liftIO
(
handleIO
(
\
_
->
pure
()
)
$
removePathForcibly
tmp
)
...
@@ -515,7 +515,7 @@ recycleFile fp
...
@@ -515,7 +515,7 @@ recycleFile fp
let
dest
=
tmp
</>
takeFileName
fp
let
dest
=
tmp
</>
takeFileName
fp
liftIO
(
moveFile
fp
dest
)
liftIO
(
moveFile
fp
dest
)
`
catch
`
`
catch
`
(
\
e
->
if
isPermissionError
e
{- EXDEV on windows -}
then
recover
(
liftIO
$
removePathForcibly
fp
)
else
throwIO
e
)
(
\
e
->
if
isPermissionError
e
||
ioeGetErrorType
e
==
UnsupportedOperation
{- EXDEV on windows -}
then
recover
(
liftIO
$
removePathForcibly
fp
)
else
throwIO
e
)
`
finally
`
`
finally
`
liftIO
(
handleIO
(
\
_
->
pure
()
)
$
removePathForcibly
tmp
)
liftIO
(
handleIO
(
\
_
->
pure
()
)
$
removePathForcibly
tmp
)
|
otherwise
=
liftIO
$
removeFile
fp
|
otherwise
=
liftIO
$
removeFile
fp
...
...
This diff is collapsed.
Click to expand it.
Julian Ospald
🍵
@maerwald
mentioned in issue
#345 (closed)
·
3 years ago
mentioned in issue
#345 (closed)
mentioned in issue #345
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment