cli: CommandUpdate: When path is a dir, don't do anything (no deletion or updates)
This commit is contained in:
parent
db029dd915
commit
05606dd502
@ -53,17 +53,20 @@ int CommandUpdate::handle(QStringList arguments)
|
||||
for(FileData &fileData : files)
|
||||
{
|
||||
QFileInfo fileInfo(fileData.absPath);
|
||||
if(fileInfo.exists() && fileInfo.isFile())
|
||||
if(fileInfo.exists())
|
||||
{
|
||||
if(fileInfo.lastModified().toSecsSinceEpoch() != fileData.mtime)
|
||||
if(fileInfo.isFile())
|
||||
{
|
||||
if(!dryRun)
|
||||
if(fileInfo.lastModified().toSecsSinceEpoch() != fileData.mtime)
|
||||
{
|
||||
filePathsToUpdate.append(fileData.absPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::info() << "Would update" << fileData.absPath << Qt::endl;
|
||||
if(!dryRun)
|
||||
{
|
||||
filePathsToUpdate.append(fileData.absPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::info() << "Would update" << fileData.absPath << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Caricamento…
Fai riferimento in un nuovo problema
Block a user