duc
duc copied to clipboard
If DB contains only one path, default to that path if one is not specified when using ls, ui, or the like
While not super essential, a nice feature would be for duc to assume a default for the path if the db only contains a single top level path and no path was specified.
This prevents having to separately query the database to find a path to specify.
For example:
# duc info -d filestore.db
Date Time Files Dirs Size Path
2023-08-18 21:04:14 0 13 52.0K /export/filestore
# duc ls -d filestore.db
Path /export/reports not found in database
Requested path not found
Segmentation fault (core dumped)
# duc ls -d filestore.db /export/filestore
48.0K filestore
It just seems less useful for it to assume the cwd is the path when that is not in the index.
Also I assume the segfault is a result of #236