Commit e24bfc54 authored by Michael Hanus 's avatar Michael Hanus
Browse files

Improve initialization of files of persistent globals

parent fbc8f97c
......@@ -98,7 +98,9 @@ external_d_C_global val (C_Persistent cname) _ _ =
where initGlobalFile name = do
ex <- doesFileExist name
if ex then return ()
else writeFile name (show val++"\n")
else do writeFile name (show val ++ "\n")
system ("chmod 600 " ++ name)
return ()
external_d_C_prim_readGlobal :: Curry_Prelude.Curry a => C_Global a -> Cover -> ConstStore
-> Curry_Prelude.C_IO a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment