Add support for the normal 'umount' porgram.
Summary: FreeBSD does not install fusermount, so we need to use 'umount'. Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: albertvaka, #kde_connect Differential Revision: https://phabricator.kde.org/D6945
This commit is contained in:
parent
b825bee1c9
commit
c93d83dfb2
3 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
# Find fusermount -- otherwise fallback to umount
|
||||
find_program(HAVE_FUSERMOUNT fusermount)
|
||||
configure_file(config-sftp.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-sftp.h )
|
||||
|
||||
find_package(KF5 REQUIRED COMPONENTS Notifications KIO)
|
||||
|
||||
set(kdeconnect_sftp_SRCS
|
||||
|
|
1
plugins/sftp/config-sftp.h.cmake
Normal file
1
plugins/sftp/config-sftp.h.cmake
Normal file
|
@ -0,0 +1 @@
|
|||
#cmakedefine01 HAVE_FUSERMOUNT
|
|
@ -27,6 +27,7 @@
|
|||
#include <KLocalizedString>
|
||||
|
||||
#include "mountloop.h"
|
||||
#include "config-sftp.h"
|
||||
#include "sftp_debug.h"
|
||||
#include "kdeconnectconfig.h"
|
||||
|
||||
|
@ -234,7 +235,11 @@ void Mounter::unmount(bool finished)
|
|||
m_proc->deleteLater();
|
||||
|
||||
//Free mount point (won't always succeed if the path is in use)
|
||||
#if defined(HAVE_FUSERMOUNT)
|
||||
KProcess::execute(QStringList() << QStringLiteral("fusermount") << QStringLiteral("-u") << m_mountPoint, 10000);
|
||||
#else
|
||||
KProcess::execute(QStringList() << QStringLiteral("umount") << m_mountPoint, 10000);
|
||||
#endif
|
||||
m_proc = nullptr;
|
||||
}
|
||||
m_started = false;
|
||||
|
|
Loading…
Reference in a new issue