~xavi-garcia-mena/keeper/restore

« back to all changes in this revision

Viewing changes to tests/utils/storage-framework-local.cpp

  • Committer: Xavi Garcia Mena
  • Date: 2016-11-16 14:03:36 UTC
  • Revision ID: xavi.garcia.mena@canonical.com-20161116140336-qqxf9w69921ulrmm
a litle tidy up

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
    return false;
186
186
}
187
187
 
 
188
bool get_storage_frameowork_file_equal_in_size_to(QString const & file_path, QString & path)
 
189
{
 
190
    auto const backups = get_storage_framework_files();
 
191
    for (auto const& backup : backups)
 
192
    {
 
193
        auto const backup_filename = backup.absoluteFilePath();
 
194
        QFileInfo info1(backup_filename);
 
195
        QFileInfo info2(file_path);
 
196
        qDebug() << "File 1 size = " << info1.size();
 
197
        qDebug() << "File 2 size = " << info2.size();
 
198
        if (info1.size() == info2.size())
 
199
        {
 
200
            path = backup_filename;
 
201
            return true;
 
202
        }
 
203
    }
 
204
    return false;
 
205
}
 
206
 
188
207
} // namespace StorageFrameworkLocalUtils