File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -661,9 +661,9 @@ executeFile fp args
661
661
--
662
662
-- - `PermissionDenied` if output directory cannot be written to
663
663
-- - `AlreadyExists` if destination file already exists
664
- createRegularFile :: Path Abs -> IO ()
665
- createRegularFile dest =
666
- bracket (SPI. openFd (fromAbs dest) SPI. WriteOnly (Just newFilePerms )
664
+ createRegularFile :: FileMode -> Path Abs -> IO ()
665
+ createRegularFile fm dest =
666
+ bracket (SPI. openFd (fromAbs dest) SPI. WriteOnly (Just fm )
667
667
(SPI. defaultFileFlags { exclusive = True }))
668
668
SPI. closeFd
669
669
(\ _ -> return () )
@@ -675,8 +675,8 @@ createRegularFile dest =
675
675
--
676
676
-- - `PermissionDenied` if output directory cannot be written to
677
677
-- - `AlreadyExists` if destination directory already exists
678
- createDir :: Path Abs -> IO ()
679
- createDir dest = createDirectory (fromAbs dest) newDirPerms
678
+ createDir :: FileMode -> Path Abs -> IO ()
679
+ createDir fm dest = createDirectory (fromAbs dest) fm
680
680
681
681
682
682
-- | Create a symlink.
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ createTmpDir :: IO ()
86
86
createTmpDir = do
87
87
pwd <- fromJust <$> getEnv " PWD" >>= P. parseAbs
88
88
tmp <- P. parseRel =<< readIORef tmpDir
89
- void $ createDir (pwd P. </> tmp)
89
+ void $ createDir newDirPerms (pwd P. </> tmp)
90
90
91
91
92
92
deleteTmpDir :: IO ()
@@ -102,7 +102,7 @@ createBaseTmpDir :: IO ()
102
102
createBaseTmpDir = do
103
103
pwd <- fromJust <$> getEnv " PWD" >>= P. parseAbs
104
104
tmp <- P. parseRel baseTmpDir
105
- void $ createDir (pwd P. </> tmp)
105
+ void $ createDir newDirPerms (pwd P. </> tmp)
106
106
107
107
108
108
deleteBaseTmpDir :: IO ()
@@ -177,12 +177,12 @@ copyDirRecursive' inputDirP outputDirP cm rm =
177
177
178
178
createDir' :: ByteString -> IO ()
179
179
{-# NOINLINE createDir' #-}
180
- createDir' dest = withTmpDir dest createDir
180
+ createDir' dest = withTmpDir dest ( createDir newDirPerms)
181
181
182
182
183
183
createRegularFile' :: ByteString -> IO ()
184
184
{-# NOINLINE createRegularFile' #-}
185
- createRegularFile' dest = withTmpDir dest createRegularFile
185
+ createRegularFile' dest = withTmpDir dest ( createRegularFile newFilePerms)
186
186
187
187
188
188
createSymlink' :: ByteString -> ByteString -> IO ()
You can’t perform that action at this time.
0 commit comments