Commits

UENISHI Kota  committed 66b1ea8

wrong open mode.

  • Participants
  • Parent commits 499ce05

Comments (0)

Files changed (1)

   in
   let fd =
     Unix.mkdir ("data/"^id) 0o755;
-    Unix.openfile (Printf.sprintf "data/%s/%s" id (Filename.basename url)) [Unix.O_WRONLY] 0o644 
+    Unix.openfile (Printf.sprintf "data/%s/%s" id (Filename.basename url)) 
+      [Unix.O_WRONLY; Unix.O_CREAT; Unix.O_TRUNC] 0o644 
   in
   let bin = http_get url in
     save_binary fd 0 (String.length bin) bin;