Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "account.h"
#include "accountstate.h"
#include "application.h"
#include "common/depreaction.h"
#include "common/filesystembase.h"
#include "common/syncjournalfilerecord.h"
#include "common/version.h"
Expand All @@ -39,6 +38,7 @@
#include "syncresult.h"
#include "syncrunfilelog.h"
#include "theme.h"
#include "guiutility.h"

#ifdef Q_OS_WIN
#include "common/utility_win.h"
Expand Down Expand Up @@ -524,6 +524,7 @@ void Folder::startVfs()
vfsParams.providerDisplayName = Theme::instance()->appNameGUI();
vfsParams.providerName = Theme::instance()->appName();
vfsParams.providerVersion = Version::version();
vfsParams.socketPath = Utility::socketApiSocketPath();

connect(&_engine->syncFileStatusTracker(), &SyncFileStatusTracker::fileStatusChanged,
_vfs.data(), &Vfs::fileStatusChanged);
Expand Down
1 change: 1 addition & 0 deletions src/libsync/vfs/vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct OPENCLOUD_SYNC_EXPORT VfsSetupParams
QString providerDisplayName;
QString providerName;
QVersionNumber providerVersion;
QString socketPath;

const QUrl &baseUrl() const { return _baseUrl; }
const QString &spaceId() const { return _spaceId; }
Expand Down
11 changes: 6 additions & 5 deletions src/plugins/vfs/openvfs/vfs_openvfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,15 @@ void OpenVFS::startImpl(const VfsSetupParams &params)
connect(_openVfsProcess, &QProcess::finished, this, [logPrefix, this] { qCFatal(lcOpenVFS) << logPrefix() << "finished" << _openVfsProcess->exitCode(); });
connect(_openVfsProcess, &QProcess::started, this, [logPrefix, this] {
qCInfo(lcOpenVFS) << logPrefix() << u"started";
// TODO:
// give it time to mount

QTimer::singleShot(1s, this, &Vfs::started);
});
connect(_openVfsProcess, &QProcess::errorOccurred, this, [logPrefix, this] { qCWarning(lcOpenVFS) << logPrefix() << _openVfsProcess->errorString(); });
_openVfsProcess->start(openVFSExePath().toString(),
{u"-d"_s, u"-i"_s, openVFSConfigFilePath().toString(), u"-o"_s, xattrOwnerString(params.account->uuid()), params.root().toString()},
QIODevice::ReadOnly);

const QStringList pparams{u"-d"_s, u"-i"_s, openVFSConfigFilePath().toString(), u"-o"_s, xattrOwnerString(params.account->uuid()),
u"-s"_s, params.socketPath, params.root().toString()};
qCDebug(lcOpenVFS) << "Starting openvfs" << pparams;
_openVfsProcess->start(openVFSExePath().toString(), pparams, QIODevice::ReadOnly);
}

void OpenVFS::stop()
Expand Down
Loading