cli: CommandUpdate: When path is a dir, don't do anything (no deletion or updates)
Šī revīzija ir iekļauta:
vecāks
db029dd915
revīzija
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā
Block a user