Changeset View
Changeset View
Standalone View
Standalone View
resources/mixedmaildir/mixedmaildirstore.cpp
Show First 20 Lines • Show All 1021 Lines • ▼ Show 20 Line(s) | 1017 | { | |||
---|---|---|---|---|---|
1022 | if (folderType == InvalidFolder) { | 1022 | if (folderType == InvalidFolder) { | ||
1023 | errorText = i18nc("@info:status", "Cannot create folder %1 inside folder %2", | 1023 | errorText = i18nc("@info:status", "Cannot create folder %1 inside folder %2", | ||
1024 | job->collection().name(), job->targetParent().name()); | 1024 | job->collection().name(), job->targetParent().name()); | ||
1025 | qCCritical(MIXEDMAILDIRRESOURCE_LOG) << errorText << "FolderType=" << folderType; | 1025 | qCCritical(MIXEDMAILDIRRESOURCE_LOG) << errorText << "FolderType=" << folderType; | ||
1026 | q->notifyError(FileStore::Job::InvalidJobContext, errorText); | 1026 | q->notifyError(FileStore::Job::InvalidJobContext, errorText); | ||
1027 | return false; | 1027 | return false; | ||
1028 | } | 1028 | } | ||
1029 | 1029 | | |||
1030 | const QString collectionName = job->collection().name().remove(QDir::separator()); | 1030 | const QString collectionName = job->collection().name().remove(QLatin1Char('/')); | ||
1031 | Maildir md; | 1031 | Maildir md; | ||
1032 | if (folderType == MBoxFolder) { | 1032 | if (folderType == MBoxFolder) { | ||
1033 | const QString subDirPath = Maildir::subDirPathForFolderPath(path); | 1033 | const QString subDirPath = Maildir::subDirPathForFolderPath(path); | ||
1034 | const QDir dir(subDirPath); | 1034 | const QDir dir(subDirPath); | ||
1035 | const QFileInfo dirInfo(dir, collectionName); | 1035 | const QFileInfo dirInfo(dir, collectionName); | ||
1036 | if (dirInfo.exists() && !dirInfo.isDir()) { | 1036 | if (dirInfo.exists() && !dirInfo.isDir()) { | ||
1037 | errorText = i18nc("@info:status", "Cannot create folder %1 inside folder %2", | 1037 | errorText = i18nc("@info:status", "Cannot create folder %1 inside folder %2", | ||
1038 | job->collection().name(), job->targetParent().name()); | 1038 | job->collection().name(), job->targetParent().name()); | ||
▲ Show 20 Lines • Show All 165 Lines • ▼ Show 20 Line(s) | 1194 | { | |||
1204 | updatedCollection.setParentCollection(updateMBoxCollectionTree(collection.parentCollection(), oldParent, newParent)); | 1204 | updatedCollection.setParentCollection(updateMBoxCollectionTree(collection.parentCollection(), oldParent, newParent)); | ||
1205 | 1205 | | |||
1206 | return updatedCollection; | 1206 | return updatedCollection; | ||
1207 | } | 1207 | } | ||
1208 | 1208 | | |||
1209 | bool MixedMaildirStore::Private::visit(FileStore::CollectionModifyJob *job) | 1209 | bool MixedMaildirStore::Private::visit(FileStore::CollectionModifyJob *job) | ||
1210 | { | 1210 | { | ||
1211 | const Collection collection = job->collection(); | 1211 | const Collection collection = job->collection(); | ||
1212 | const QString collectionName = collection.name().remove(QDir::separator()); | 1212 | const QString collectionName = collection.name().remove(QLatin1Char('/')); | ||
1213 | 1213 | | |||
1214 | // we also only do renames | 1214 | // we also only do renames | ||
1215 | if (collection.remoteId() == collection.name()) { | 1215 | if (collection.remoteId() == collection.name()) { | ||
1216 | qCWarning(MIXEDMAILDIRRESOURCE_LOG) << "CollectionModifyJob with name still identical to remoteId. Ignoring"; | 1216 | qCWarning(MIXEDMAILDIRRESOURCE_LOG) << "CollectionModifyJob with name still identical to remoteId. Ignoring"; | ||
1217 | return true; | 1217 | return true; | ||
1218 | } | 1218 | } | ||
1219 | 1219 | | |||
1220 | QString path; | 1220 | QString path; | ||
▲ Show 20 Lines • Show All 1201 Lines • Show Last 20 Lines |