| Summary: | kmailcvt: problem with import of subfolders | ||
|---|---|---|---|
| Product: | [Unmaintained] kmail | Reporter: | Danny Kukawka <danny.kukawka> |
| Component: | kmailcvt | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | SVN (3.5 branch) | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Danny Kukawka
2005-04-01 12:32:53 UTC
CVS commit by dkukawka:
fixed problem with import subfolder for thunderbird and evolution 2.x
BUGS: 102992
M +8 -4 filter_evolution_v2.cxx 1.9
M +7 -4 filter_thunderbird.cxx 1.9
--- kdepim/kmailcvt/filter_evolution_v2.cxx #1.8:1.9
@@ -80,5 +80,5 @@ void FilterEvolution_v2::import(FilterIn
int currentDir = 1, numSubDirs = rootSubDirs.size();
for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
- importDirContents(info, dir.filePath(*filename), *filename, QString::null);
+ importDirContents(info, dir.filePath(*filename), *filename, *filename);
info->setOverall((int) ((float) currentDir / numSubDirs * 100));
}
@@ -185,12 +185,16 @@ void FilterEvolution_v2::importMBox(Filt
tmp.close();
- QString destFolder = rootDir;
+ QString destFolder = "";
QString _targetDir = targetDir;
- if(destFolder.contains(".sbd")) destFolder.remove(".sbd");
if(!targetDir.isNull()){
if(_targetDir.contains(".sbd")) _targetDir.remove(".sbd");
- destFolder += ("-" + _targetDir);
+ destFolder += _targetDir;
destFolder += "-" + filenameInfo.baseName(TRUE);// mboxName;
}
+ else {
+ destFolder = rootDir;
+ if(destFolder.contains(".sbd")) destFolder.remove(".sbd");
+ }
+
if(info->removeDupMsg) addMessage( info, destFolder, tmp.name() );
--- kdepim/kmailcvt/filter_thunderbird.cxx #1.8:1.9
@@ -79,5 +79,5 @@ void FilterThunderbird::import(FilterInf
int currentDir = 1, numSubDirs = rootSubDirs.size();
for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
- importDirContents(info, dir.filePath(*filename), *filename, QString::null);
+ importDirContents(info, dir.filePath(*filename), *filename, *filename);
info->setOverall((int) ((float) currentDir / numSubDirs * 100));
}
@@ -181,12 +181,15 @@ void FilterThunderbird::importMBox(Filte
}
tmp.close();
- QString destFolder = rootDir;
+ QString destFolder = "";
QString _targetDir = targetDir;
- if(destFolder.contains(".sbd")) destFolder.remove(".sbd");
if(!targetDir.isNull()){
if(_targetDir.contains(".sbd")) _targetDir.remove(".sbd");
- destFolder += ("-" + _targetDir);
+ destFolder += _targetDir;
destFolder += "-" + filenameInfo.baseName(TRUE);// mboxName;
}
+ else {
+ destFolder = rootDir;
+ if(destFolder.contains(".sbd")) destFolder.remove(".sbd");
+ }
if(info->removeDupMsg) addMessage( info, destFolder, tmp.name() );
|