diff --git a/repertory/librepertory/src/drives/fuse/fuse_base.cpp b/repertory/librepertory/src/drives/fuse/fuse_base.cpp index 226364bd..ad969f15 100644 --- a/repertory/librepertory/src/drives/fuse/fuse_base.cpp +++ b/repertory/librepertory/src/drives/fuse/fuse_base.cpp @@ -422,7 +422,12 @@ auto fuse_base::mount([[maybe_unused]] std::vector orig_args, fuse_parse_cmdline(&f_args, &opts); mount_location = opts.mountpoint; #else // FUSE_USE_VERSION < 30 - auto res = fuse_parse_cmdline(&f_args, &mount_location, nullptr, nullptr); + ret = fuse_parse_cmdline(&f_args, &mount_location, nullptr, nullptr); + if (ret != 0) { + std::cerr << "FATAL: Failed to process fuse command line options" + << std::endl; + return -1; + } #endif // FUSE_USE_VERSION >= 30 if (mount_location != nullptr) { @@ -481,8 +486,16 @@ auto fuse_base::mount([[maybe_unused]] std::vector orig_args, } #endif // defined(__APPLE__) + if (not foreground_) { + repertory::project_cleanup(); + } + notify_fuse_args_parsed(args); +#if FUSE_USE_VERSION < 30 + umask(0); +#endif // FUSE_USE_VERSION < 30 + ret = fuse_main( static_cast(fuse_argv.size()), reinterpret_cast(const_cast(fuse_argv.data())),