socketapi: if the filename is empty, it's actually /

This commit is contained in:
Klaas Freitag 2014-10-13 15:36:13 +02:00
parent 8371e34d87
commit 561e3c780d

View file

@ -552,10 +552,11 @@ void SocketApi::command_RETRIEVE_FILE_STATUS(const QString& argument, SocketType
DEBUG << "folder offline or not watched:" << argument;
statusString = QLatin1String("NOP");
} else {
const QString file = argument.mid(syncFolder->path().length());
SyncFileStatus fileStatus = SocketApiHelper::fileStatus(syncFolder, file, _excludes);
QString file = argument.mid(syncFolder->path().length());
if( file.isEmpty() ) file = QLatin1String("/");
SyncFileStatus fStatus = this->fileStatus(syncFolder, file, _excludes);
statusString = fileStatus.toSocketAPIString();
statusString = fStatus.toSocketAPIString();
}
QString message = QLatin1String("STATUS:")+statusString+QLatin1Char(':')