cli: CommandUpdate: When path is a dir, don't do anything (no deletion or updates)

This commit is contained in:
Albert S. 2022-06-02 09:05:49 +02:00
parent db029dd915
commit 05606dd502

View File

@ -53,7 +53,9 @@ int CommandUpdate::handle(QStringList arguments)
for(FileData &fileData : files)
{
QFileInfo fileInfo(fileData.absPath);
if(fileInfo.exists() && fileInfo.isFile())
if(fileInfo.exists())
{
if(fileInfo.isFile())
{
if(fileInfo.lastModified().toSecsSinceEpoch() != fileData.mtime)
{
@ -67,6 +69,7 @@ int CommandUpdate::handle(QStringList arguments)
}
}
}
}
else
{
if(deleteMissing)