feat: make volname default to mountdir (#226)

* feat: make volname default to mountdir
This commit is contained in:
acheronfail 2018-10-20 05:37:21 +11:00 committed by Sebastian Meßmer
parent 10f8adbb73
commit 43755969ca
1 changed files with 4 additions and 0 deletions

View File

@ -258,6 +258,10 @@ vector<char *> Fuse::_build_argv(const bf::path &mountdir, const vector<string>
}
_add_fuse_option_if_not_exists(&argv, "subtype", _fstype);
_add_fuse_option_if_not_exists(&argv, "fsname", _fsname.get_value_or(_fstype));
#ifdef __APPLE__
// Make volume name default to mountdir on macOS
_add_fuse_option_if_not_exists(&argv, "volname", mountdir.filename().string());
#endif
// TODO Also set read/write size for osxfuse. The options there are called differently.
// large_read not necessary because reads are large anyhow. This option is only important for 2.4.
//argv.push_back(_create_c_string("-o"));