Commit Graph

5 Commits

Author SHA1 Message Date
Érico Rolim 06eb9d4222 Split mmap_file implementation.
Also add some useful definitions.
2020-09-14 00:32:16 -03:00
Érico Rolim 94f8f4f61d Enable encrypted pastes properly.
Add base64 encoding per the pattern expected by the web interface.

Fix some pointers and file size things in purr/files.

TODO: files are cut off at random points, despite the efforts to remove
verification of null characters in libbaseencode.
2020-09-13 18:05:43 -03:00
Érico Rolim 1b4c19665c Fix some issues with the mmap impl.
Main one was using file->data instead of file->cursor in
write_into_mmap.

Switching to ftruncate in place of posix_fallocate was done for compat
reasons (posix_fallocate isn't available everywhere _and_ it can fail on
some file systems).
2020-09-13 16:08:40 -03:00
Érico Rolim baa013afae Move to mmap implementation.
Using FILE* is error prone and limited.
2020-09-13 13:32:28 -03:00
Érico Rolim f3069bb932 Split functionality into different files. 2020-09-10 23:33:52 -03:00