git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: work around 'file busy' error (again, and revisit later)
commitdec8559be380335bfbb14b88940a6721a6be0dcc authorAndy Arvanitis <andyarvanitis@gmail.com> dateWed 10 Aug 2016, 20:11 (10 years ago) parent2838edc
1 file changed+3−5
pcc/Make.hs+3−5
pcc/Make.hs+3−5
@@ -157,11 +157,9 @@ buildMakeActions outputDir filePathMap usePrefix =
157157
158158 writeTextFile :: FilePath -> String -> Make ()
159159 writeTextFile path text = makeIO (const (ErrorMessage [] $ CannotWriteFile path)) $ do
160− mkdirp path
161− writeFile path text
162− where
163− mkdirp :: FilePath -> IO ()
164− mkdirp = createDirectoryIfMissing True . takeDirectory
160+ createDirectoryIfMissing True (takeDirectory path)
161+ _ <- tryIOError $ writeFile path text -- TODO: intended to ignore "file busy", fix properly asap
162+ return ()
165163
166164 -- | Render a progress message
167165 renderProgressMessage :: P.ProgressMessage -> String