mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Shows an error about wrong permissions
If an import fails, the permissions of the device are tested and an error message that mentions permissions is shown to the user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2295e0c21e
commit
e024a5b207
1 changed files with 3 additions and 1 deletions
|
@ -849,7 +849,9 @@ const char *do_libdivecomputer_import(device_data_t *data)
|
|||
err = do_device_import(data);
|
||||
/* TODO: Show the logfile to the user on error. */
|
||||
dc_device_close(data->device);
|
||||
}
|
||||
} else if (access(data->devname, R_OK | W_OK) != 0)
|
||||
err = translate("gettextFromC", "Insufficient privileges to open the device %s %s (%s)");
|
||||
|
||||
dc_context_free(data->context);
|
||||
|
||||
if (fp) {
|
||||
|
|
Loading…
Add table
Reference in a new issue