mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Add more debug in case inotify fails
We should probably make this at least a visible error, because it's a limitation set by the kernel/the distro and we would require root permissions to adjust the value. Right now all that happens is that syncing is not immediate, but only run every 30 secs (due to server polling).
This commit is contained in:
parent
8dd97a358a
commit
bfbec24f43
1 changed files with 4 additions and 2 deletions
|
@ -39,8 +39,10 @@ INotify::INotify(QObject *parent, int mask)
|
|||
_mask(mask)
|
||||
{
|
||||
_fd = inotify_init();
|
||||
if (_fd == -1)
|
||||
qDebug() << Q_FUNC_INFO << "notify_init() failed: " << strerror(errno);
|
||||
_notifier = new QSocketNotifier(_fd, QSocketNotifier::Read);
|
||||
QObject::connect(_notifier, SIGNAL(activated(int)), SLOT(slotActivated(int)));
|
||||
connect(_notifier, SIGNAL(activated(int)), SLOT(slotActivated(int)));
|
||||
_buffer_size = DEFAULT_READ_BUFFERSIZE;
|
||||
_buffer = (char *) malloc(_buffer_size);
|
||||
}
|
||||
|
@ -121,7 +123,7 @@ void INotify::addPath(const QString &path)
|
|||
if( wd > -1 )
|
||||
_wds[path] = wd;
|
||||
else
|
||||
qDebug() << "WRN: Could not watch " << path;
|
||||
qDebug() << "WRN: Could not watch " << path << ':' << strerror(errno);
|
||||
}
|
||||
|
||||
void INotify::removePath(const QString &path)
|
||||
|
|
Loading…
Reference in a new issue