Don't allow creation of a new maildir folder if there is already a folder with the same name in ~/Mail which has a cur, tmp or new subfolder. This was requested by Ingo.

svn path=/trunk/kdepim/; revision=270288
wilder-work
Till Adam 23 years ago
parent b65ba9b24c
commit 0752c9362e
  1. 11
      kmfoldermaildir.cpp

@ -134,7 +134,16 @@ int KMFolderMaildir::create(bool imap)
assert(!name().isEmpty());
assert(mOpenCount == 0);
// Make sure that neither a new, cur or tmp subfolder exists already.
QFileInfo dirinfo;
dirinfo.setFile(location() + "/new");
if (dirinfo.exists()) return 1;
dirinfo.setFile(location() + "/cur");
if (dirinfo.exists()) return 1;
dirinfo.setFile(location() + "/tmp");
if (dirinfo.exists()) return 1;
// create the maildir directory structure
if (::mkdir(QFile::encodeName(location()), S_IRWXU) > 0)
{

Loading…
Cancel
Save