Skip to content

Commit

Permalink
Merge pull request #62 from ukleinek/master
Browse files Browse the repository at this point in the history
automatically create mount prefix and more conservative permissions
  • Loading branch information
Enrico Jorns committed Aug 15, 2016
2 parents 66862b2 + d0297cb commit b9fbc96
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,11 @@ gchar* r_create_mount_point(const gchar *name, GError **error) {
gchar* mountpoint = NULL;

prefix = r_context()->config->mount_prefix;
if (!g_file_test (prefix, G_FILE_TEST_IS_DIR)) {
g_set_error(
error,
G_FILE_ERROR,
G_FILE_ERROR_NOTDIR,
"mount prefix path %s does not exist",
prefix);
goto out;
}


mountpoint = g_build_filename(prefix, name, NULL);

if (!g_file_test (mountpoint, G_FILE_TEST_IS_DIR)) {
gint ret;
ret = g_mkdir(mountpoint, 0777);
ret = g_mkdir_with_parents(mountpoint, 0700);

if (ret != 0) {
g_set_error(
Expand Down

0 comments on commit b9fbc96

Please sign in to comment.