Commit dd118398 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix search existing config

parent 9894d265
......@@ -67,7 +67,7 @@ void ImportMailJobInterfaceTest::importMail()
impl->setPathConfig(file->pathConfig());
impl->setExtractPath(file->extractPath());
impl->setTempDirName(file->extractPath());
impl->setExistingPathConfig(fullTestPath + QStringLiteral("/existingconfig"));
impl->setExistingPathConfig(fullTestPath + QStringLiteral("/existingconfig/"));
file->setAbstractImportExportJob(impl);
file->setLoggingFilePath(impl->loggingFilePath());
file->start();
......
......@@ -47,11 +47,13 @@ void ImportNotesJobInterfaceTest::importNote()
QFETCH(QString, testPath);
QFETCH(Utils::StoredTypes, options);
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
const QString fullTestPath = zipFilePath + testPath;
file->setPathConfig(fullTestPath);
file->setExtractPath(QDir::tempPath() + testPath);
file->setExcludePath(Utils::notePath());
ImportNotesJobInterfaceTestImpl *impl = new ImportNotesJobInterfaceTestImpl(this, options, file->archiveStorage(), 1);
impl->setPathConfig(file->pathConfig());
impl->setExistingPathConfig(fullTestPath + QStringLiteral("/existingconfig/"));
file->setAbstractImportExportJob(impl);
file->setLoggingFilePath(impl->loggingFilePath());
file->start();
......
......@@ -100,6 +100,7 @@ void ImportNotesJobInterface::restoreConfig()
const KArchiveFile *globalNotecentryrc = static_cast<const KArchiveFile *>(globalNotecentry);
const QString searchExistingGlobalNoterc = configLocation() + globalNoteStr;
const QString installPathGlobalNoterc = installConfigLocation() + globalNoteStr;
qDebug() << " searchExistingGlobalNoterc "<< searchExistingGlobalNoterc << " installPathGlobalNoterc " << installPathGlobalNoterc;
if (QFileInfo::exists(searchExistingGlobalNoterc)) {
if (overwriteConfigMessageBox(globalNoteStr)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment