HalosGhost / pandabin

A self-hostable, simple and fast pastebin written in C
GNU General Public License v3.0
3 stars 0 forks source link

Remove Path from the pastes table #16

Open HalosGhost opened 7 years ago

HalosGhost commented 7 years ago

The path is going to be identical for all pastes (save the hash (and the subdir which is derived from the hash)). We should store this once as a setting rather than on each record.

HalosGhost commented 7 years ago

Okay, the basic work here is done. The path field has been removed from the table and the struct, and we have the preliminaries done for building the path on-the-fly.

All that remains to do is to finish the work on building the path (should probably be separated into its own function since we're going to do this routine a few times), and then to handle a command-line option for setting the database location (since it must be known before the filepath can be read from the db—obviously).

HalosGhost commented 7 years ago

external path resolution via 3d246ac926ecfc61c4b41fb240fb91eb0b33d7a9