.arg(ReQStringUtils::readableDuration(
QDateTime::currentMSecsSinceEpoch() - start)));
}
+void checkInfo(const QString& info){
+ int ix = info.indexOf('\t') + 1;
+ if (ix > 0 && ix < info.length() && info.at(ix) > ' '){
+ QChar cc = info.at(ix);
+ ix++;
+ }
+}
+
/**
* Search the files to backup and write it to a list.
*
if (doTransfer){
info = prefix + it.fileName();
}
- m_mutex.lock();
+ m_mutex.lock();
if (doTransfer){
m_files.append(info);
m_hotFiles++;
isEmpty = false;
info = QChar(MAX_INDEX) + ReFileUtils::nativePath(it.filePath()) + m_separatorString
+ QChar(CmdRemove);
+#if defined _DEBUG
+ checkInfo(info);
+#endif
m_mutex.lock();
m_files.append(info);
m_hotFiles++;
m_mainWindow->addToFileList("x " + directory);
info = QChar(MAX_INDEX) + directory + m_separatorString
+ QChar(CmdRemoveDir);
- m_mutex.lock();
+#if defined _DEBUG
+ checkInfo(info);
+#endif
+ m_mutex.lock();
m_files.append(info);
m_matchedFiles++;
m_hotFiles++;
info = prefix + QChar(command) + it.fileName();
}
}
- m_mutex.lock();
+#if defined _DEBUG
+ checkInfo(info);
+#endif
+ m_mutex.lock();
if (command != CmdUndef){
m_files.append(info);
m_hotFiles++;
*/
void SearchTargetTask::moveToShadow(const QString& target, const QString& relPath, int index){
QString shadowDir = m_shadowDirs.at(index) + relPath;
- if (! ReFileUtils::makeDirWithParents(shadowDir))
+ ReQStringUtils::chomp(shadowDir, OS_SEPARATOR);
+ if (! ReFileUtils::makeDirWithParents(shadowDir)){
+
error(QObject::tr("cannot create shadow directory (%1): %2")
.arg(errno).arg(shadowDir));
- else {
+ } else {
QString shadow = shadowDir + ReFileUtils::nodeOf(target);
if (rename(I18N::s2b(target).constData(), I18N::s2b(shadow).constData()) != 0){
error(QObject::tr("cannot move to shadow directory (%1): %2 -> %3")