Then there's another sqlite3 database for the daemon configuration which has things like port, settings and references to the known shares the daemon should attach on boot. (see conf.cpp)
We have one config db for the daemon and then one manifest database for each share which can be hundreds of mb for big shares. I thought the default to be a file with a name derived from the shared directory in the same folder such as 'shared' and 'shared__cs.db' in the same parent dir. I think it makes more sense to have the default together with the shared directory because:
1. You can erase the manifest db if you want.
2. Copy the manifest db together with the share to move it somewhere (ex USB)
3. Don't blow up a hidden dir in the users home by default.
4. Don't blow up some /system dir in android. The manifest is in the sdcard together with the share.
You can always associate a share with a manifest in a different location set in conf.db and as seen in the cs::Share ctor.
$ cs attach shared
$ cs attach shared ~/.cs/share__cs.db
Maybe you have other ideas worth discussing. Those were my original thoughts. I didn't get why this approach might hurt user experience. Maybe you can elaborate.
Regards.
Pedro.
I think an sqlite file is ok for human interaction as a config file. Specially when you can configure it through simple commands in the commandline client or easily through a GUI in another language or through the remote control protocol.
Don't you think? I think its better to skip the headache to parse some config file. Well of course also it can be json. This is another option.
I don't have a strong option on this. But we need a db to store the shares that the daemon has attached at least.
Pedro.
--
You can see how I thought this to work in the share unit test. Nothing set in stone. We can change to something better if somebody has a better idea.
Pedro.
I think you have given good arguments. I agree now that the default behaviour should be to have the manifest all in the config dir. You missed the point that the manifest is not inside the shared folder, but as a sibling in its parent directory. So it invalidates some of your points but not all.
What should this directory be? .clearskies/shares ?
Pedro.