From 8bf8081464a24a177540852a69a0b714e74c5211 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Tue, 7 Jun 2016 12:44:35 -0700 Subject: [PATCH] Fix sigsev on startup which was introduced by commit 1bb38f39b4a5d6aabb99c576f5cffd596940f74d --- src/fspp/fuse/Fuse.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fspp/fuse/Fuse.cpp b/src/fspp/fuse/Fuse.cpp index 572d97e8..eec0e10c 100644 --- a/src/fspp/fuse/Fuse.cpp +++ b/src/fspp/fuse/Fuse.cpp @@ -241,14 +241,14 @@ void Fuse::run(const bf::path &mountdir, const vector &fuseOptions) { vector Fuse::_build_argv(const bf::path &mountdir, const vector &fuseOptions) { vector argv; - _argv.reserve(6 + fuseOptions.size()); // fuseOptions + executable name + mountdir + 2x fuse options (subtype, fsname), each taking 2 entries ("-o", "key=value"). - _argv.push_back(_create_c_string(_fstype)); // The first argument (executable name) is the file system type - _argv.push_back(_create_c_string(mountdir.native())); // The second argument is the mountdir + argv.reserve(6 + fuseOptions.size()); // fuseOptions + executable name + mountdir + 2x fuse options (subtype, fsname), each taking 2 entries ("-o", "key=value"). + argv.push_back(_create_c_string(_fstype)); // The first argument (executable name) is the file system type + argv.push_back(_create_c_string(mountdir.native())); // The second argument is the mountdir for (const string &option : fuseOptions) { - _argv.push_back(_create_c_string(option)); + argv.push_back(_create_c_string(option)); } - _add_fuse_option_if_not_exists(&_argv, "subtype", _fstype); - _add_fuse_option_if_not_exists(&_argv, "fsname", _fsname.get_value_or(_fstype)); + _add_fuse_option_if_not_exists(&argv, "subtype", _fstype); + _add_fuse_option_if_not_exists(&argv, "fsname", _fsname.get_value_or(_fstype)); return argv; }