summaryrefslogtreecommitdiffstats
path: root/exfat/exfat-fuse/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'exfat/exfat-fuse/main.c')
-rw-r--r--exfat/exfat-fuse/main.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/exfat/exfat-fuse/main.c b/exfat/exfat-fuse/main.c
index 7f4ac1896..0023b9d13 100644
--- a/exfat/exfat-fuse/main.c
+++ b/exfat/exfat-fuse/main.c
@@ -38,7 +38,8 @@
#error FUSE 2.6 or later is required
#endif
-const char* default_options = "ro_fallback,allow_other,blkdev,big_writes";
+const char* default_options = "ro_fallback,allow_other,blkdev,big_writes,"
+ "defer_permissions";
struct exfat ef;
@@ -79,7 +80,7 @@ static int fuse_exfat_truncate(const char* path, off64_t size)
if (rc != 0)
return rc;
- rc = exfat_truncate(&ef, node, size);
+ rc = exfat_truncate(&ef, node, size, true);
exfat_put_node(&ef, node);
return rc;
}
@@ -343,19 +344,6 @@ static char* add_option(char* options, const char* name, const char* value)
return options;
}
-static char* add_fsname_option(char* options, const char* spec)
-{
- char spec_abs[PATH_MAX];
-
- if (realpath(spec, spec_abs) == NULL)
- {
- free(options);
- exfat_error("failed to get absolute path for `%s'", spec);
- return NULL;
- }
- return add_option(options, "fsname", spec_abs);
-}
-
static char* add_user_option(char* options)
{
struct passwd* pw;
@@ -387,7 +375,7 @@ static char* add_blksize_option(char* options, long cluster_size)
static char* add_fuse_options(char* options, const char* spec)
{
- options = add_fsname_option(options, spec);
+ options = add_option(options, "fsname", spec);
if (options == NULL)
return NULL;
options = add_user_option(options);