summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-11-13 19:36:08 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-13 11:58:59 -0800
commit4096383fb57ab33e9adc32a13f20b7a58a2c33c7 (patch)
treef6c1a20f0ea269256a0124955487b911dae6b583 /libdivecomputer.c
parent61dc19d2e0bc69004b03a990993eda547f4e0093 (diff)
downloadsubsurface-4096383fb57ab33e9adc32a13f20b7a58a2c33c7.tar.gz
Add subsurface_access()
For our usage the method will acept UTF-8 paths, which are converted to UTF-16 on Win32. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index 991aaaa72..17bd01a0a 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -849,7 +849,7 @@ 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)
+ } else if (subsurface_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);