objective categorical abstract machine language personal data server
65
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix blob write logic

futurGH 3505946f 5ddff0b9

+3 -6
+3 -6
pegasus/lib/user_store.ml
··· 200 200 execute 201 201 {sql| CREATE TABLE IF NOT EXISTS blobs ( 202 202 id INTEGER PRIMARY KEY, 203 - cid TEXT NOT NULL, 203 + cid TEXT NOT NULL UNIQUE, 204 204 mimetype TEXT NOT NULL 205 205 ) 206 206 |sql}] ··· 441 441 (Util.Constants.user_blobs_location t.did) 442 442 (Cid.to_string cid) 443 443 in 444 - let _ = 445 - Core_unix.openfile ~mode:[O_CREAT; O_WRONLY] file 446 - |> Core_unix.single_write ~buf:data 447 - in 448 - let _ = Out_channel.with_open_bin file Out_channel.output_bytes data in 444 + Core_unix.mkdir_p (Filename.dirname file) ~perm:0o755 ; 445 + Out_channel.with_open_bin file (fun oc -> Out_channel.output_bytes oc data) ; 449 446 Util.use_pool t.db @@ Queries.put_blob cid mimetype 450 447 451 448 let list_blob_refs t path : Cid.t list Lwt.t =