mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Add log messages for LockWatcher use #5190
This commit is contained in:
parent
85b8ab178e
commit
0cea3d85f5
1 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include "filesystem.h"
|
#include "filesystem.h"
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
using namespace OCC;
|
using namespace OCC;
|
||||||
|
|
||||||
|
@ -30,6 +31,7 @@ LockWatcher::LockWatcher(QObject* parent)
|
||||||
|
|
||||||
void LockWatcher::addFile(const QString& path)
|
void LockWatcher::addFile(const QString& path)
|
||||||
{
|
{
|
||||||
|
qDebug() << "Watching for lock of" << path << "being released";
|
||||||
_watchedPaths.insert(path);
|
_watchedPaths.insert(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +41,7 @@ void LockWatcher::checkFiles()
|
||||||
|
|
||||||
foreach (const QString& path, _watchedPaths) {
|
foreach (const QString& path, _watchedPaths) {
|
||||||
if (!FileSystem::isFileLocked(path)) {
|
if (!FileSystem::isFileLocked(path)) {
|
||||||
|
qDebug() << "Lock of" << path << "was released";
|
||||||
emit fileUnlocked(path);
|
emit fileUnlocked(path);
|
||||||
unlocked.insert(path);
|
unlocked.insert(path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue