Skip to content

Reading nonexistent file from command line produces complaint about DB type, not file existence error #349

@robertbruntz

Description

@robertbruntz

Running duc ui -d <file> on a non-existent file produces an error that sounds like the file contains an unsupported DB type, rather than reporting that the file doesn't exist.

$ cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
$ duc --version
duc version: 1.4.5
options: cairo x11 ui tokyocabinet
$ duc ui -d /etc/fstab   # file does exist, but does not contain a DB
Error opening: /etc/fstab - unsupported DB type unknown, compiled for tokyocabinet
Unknown error, contact the author
$ duc ui -d /etc/fstab2   # file does not exist at all
Error opening: /etc/fstab2 - unsupported DB type unknown, compiled for tokyocabinet
Database not found
$ ls /etc/fstab2
ls: cannot access '/etc/fstab2': No such file or directory

A much-more-helpful message would be something like the one from ls, above, so that the user can more easily spot a path or filename typo, etc., rather than thinking that the file exists but has become corrupted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions