replace removeLink with removeFile

removeFile calls unlink so removes anything not a directory. So these
are replaceable in order to convert to OsPath.
This commit is contained in:
Joey Hess 2025-02-02 14:16:58 -04:00
parent 8af91a4c92
commit 5cc8d9d03b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 39 additions and 41 deletions

View file

@ -340,7 +340,7 @@ forceStopSsh socketfile = withNullHandle $ \nullh -> do
}
void $ liftIO $ catchMaybeIO $ withCreateProcess p $ \_ _ _ pid ->
forceSuccessProcess p pid
liftIO $ removeWhenExistsWith R.removeLink (fromOsPath socketfile)
liftIO $ removeWhenExistsWith removeFile socketfile
{- This needs to be as short as possible, due to limitations on the length
- of the path to a socket file. At the same time, it needs to be unique