After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350913 - Cannot delete empty folder, it prompts "Directory not empty"
Cannot delete empty folder, it prompts "Directory not empty"
Status: RESOLVED INCOMPLETE
Product: evolution
Classification: Applications
Component: Mailer
2.26.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-08-11 15:42 UTC by Matthew Barnes
Modified: 2011-11-28 06:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
This is the tarball containing the offending folder (151.15 KB, application/x-compressed-tar)
2009-07-12 12:06 UTC, Roshan George
Details

Description Matthew Barnes 2006-08-11 15:42:05 UTC
Forwarding this bug from downstream.
Confirmed that it still exists in Evolution 2.7.91.
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=201672


Description of problem:


Version-Release number of selected component (if applicable):
evolution-2.7.4-4

How reproducible:
always

Steps to Reproduce:
1. Launch Mail-Evolution
2. Create a new folder named "Backup" under "On This Computer"
3. Right click "Inbox" under "On This Computer" and select "Copy" to folder "Backup"
4. Right click "Drafts" under "On This Computer" and select "Copy" to folder
"Inbox" (Backup - Inbox)
5. Rename "Inbox" (which is under "Backup") to "Inbox-backup"
6. Remove "Drafts" (which is under "Inbox-backup") to folder "Backup", that is
to say now "Inbox-backup" and "Drafts" are all under "Backup"
7. Right click "Inbox-backup" and select "Delete"

  
Actual results:
Cannot delete the folder although it is empty. pls see attached screenshot.


Expected results:


Additional info:
[Ed: I imagine the steps can be boiled down to a simpler procedure.]
Comment 1 Matthew Barnes 2006-08-11 15:43:57 UTC
Screenshots of the procedure and resulting error:
http://bugzilla.redhat.com/bugzilla/attachment.cgi?id=133774
Comment 2 ushveen kaur 2006-09-12 04:30:46 UTC
This behaviour does not happen if we have multiple levels of subfolders in "Drafts" folder and try to delete at a particular sub folder level.
Comment 3 Chris Wagner 2006-11-29 21:39:50 UTC
This is almost certainly the same bug that I am seeing in Ubuntu Edgy (6.10), which includes Evolution 2.8.1.  The Ubuntu bug report: https://launchpad.net/distros/ubuntu/+source/evolution/+bug/72761
Comment 4 André Klapper 2007-05-24 00:23:37 UTC
duplicate of bug 413268 which is fixed in 2.10.0?
matthew, still an issue?
Comment 5 Chris Wagner 2007-05-30 20:44:27 UTC
The system on which I had this problem is currently out of commission.  I am about to purchase a new motherboard/CPU for it, and once I get it back into working order, I'll report back here in regard to this issue.
Comment 6 André Klapper 2007-07-06 19:38:19 UTC
matthew: ping (comment #4)
Comment 7 Chris Wagner 2007-07-10 06:27:07 UTC
I am still unable to delete my empty folders.  I'm using Evolution 2.10.1.
Comment 8 André Klapper 2007-07-10 10:06:58 UTC
Chris: Which distro? Ubuntu 7.04? Local folders?
Comment 9 Chris Wagner 2007-07-10 15:13:38 UTC
Ah, yes -- I'm on Ubuntu 7.04, and the troublesome folders are local ones.
Comment 10 Matthew Barnes 2007-08-23 03:03:05 UTC
I believe this is still a problem in Evolution 2.11.90.  I'll double check.
Comment 11 André Klapper 2007-12-09 00:38:04 UTC
hasn't this been fixed in the meantime?
Comment 12 Chris Wagner 2007-12-10 18:26:31 UTC
I still have this problem with Evolution 2.12.1, in Ubuntu 7.10.
Comment 13 Matthew Barnes 2008-03-11 00:27:08 UTC
Bumping version to a stable release.
Comment 14 Chris Wagner 2008-03-21 06:52:04 UTC
Okay, I've largely deciphered the details that make this bug appear...

What I've noticed, is, Evolution will not delete a directory that has "unregistered" files lying around.  (Actually, it seems Evolution will *sometimes* delete these unidentified-flying-files, but not always...)  So, in the case of the example that the original bug reporter gave, there will be two stale files under the directory ~/.evolution/local/Backup.sbd/Inbox-backup.sbd/; they are "Drafts.ibex.index" and "Drafts.ibex.index.data".  After deleting these two files manually (i.e., on the command line), Evolution has no trouble deleting my folder, "On This Computer -> Backup -> Inbox-backup" via the standard Evolution interface.

The fact that Evolution leaves these stale files ("Drafts.ibex.index" and "Drafts.ibex.index.data") lying around may be considered another minor bug in itself, as I actually ran into this problem through some other circumstances -- of which I have no idea, now; it's been years.  But, I do know that it has to do with *stale* files lying around in these ".sbd" directories.  I have several folders that contain these stale files, and the stale file seems to be exactly the same (same file content) for each of the "undelete-able" directories that I've accumulated.

If an Evolution developer can offer a suggestion as to how this should be fixed, I wouldn't mind cracking a shot at a patch.  For instance, should we simply make the error message more informative: "Could not delete folder `such-and-such` because some stale files were found.  Please manually clean out directory `~/.evolution/mail/local/such-and-such.sbd`."

Any input appreciated...  Thanks!
Comment 15 Roshan George 2009-07-12 12:05:14 UTC
Hello. I encountered this bug today in Evolution 2.26.1. The structure of my folders was as follows:

Inbox
|-- Mailing Lists
    |-- gnome-art
    |-- some-other-list

I attempted to delete the gnome-art folder because I no longer subscribe to the list. When I did this, all the mail in the folder was deleted but the folder itself was not deleted. When I tried to delete the folder again, I received the same message as the bug report. The exact message was:

----------
Cannot delete folder "Inbox/Mailing Lists/gnome-art".

Because "Folder 'Inbox/Mailing Lists/gnome-art' is not empty. Not deleted.".
----------

On looking in the Trash folder in Evolution, I found that all the mail deleted from the gnome-art folder was there. I then attempted to empty the trash, but that failed because while all other mail was deleted, the gnome-art mail wasn't. The error given was:

----------
Error while Expunging folder.

Error storing '~/.evolution/mail/local/Inbox/Mailing Lists/gnome-art (mbox)': Summary and folder mismatch, even after a sync
----------

Eventually, I found a solution. Apparently, this folder was stored in ~/.evolution/mail/local/Inbox.sbd/Mailing Lists.sbd as the following files:
gnome-art
gnome-art.cmeta
gnome-art.ibex.index
gnome-art.ibex.index.data

Of these, apparently the gnome-art.cmeta file stores information as to which mail messages are deleted. After deleting everything but the file named gnome-art with Evolution closed, I opened Evolution to see all the deleted files back in the gnome-art folder. Attempting to delete this folder the second time was successful and I was now able to empty the Trash.

Since this folder contains public mail, and since I don't think there is anything personal here, I have attached a tarball containing the files specified above. Extracting that into ~/.evolution/ should recreate this Evolution folder.

Some other notes:
I vaguely remember moving this folder from somewhere else and having trouble a long time ago. I may have recreated the folder or persisted despite an error displayed.

Is there anything I can do to help diagnose why this happened?
Comment 16 Roshan George 2009-07-12 12:06:31 UTC
Created attachment 138269 [details]
This is the tarball containing the offending folder

Extract into ~/.evolution
Comment 17 Akhil Laddha 2011-10-14 09:39:51 UTC
cann't reproduce in Evolution 3.2.0 with the steps mentioned in original bug description.

Can you please check again whether this issue still happens in Evolution 3.0.3 or 3.2.0 and update this report by adding a comment and changing the "Version"
field? Thanks a lot.
Comment 18 Akhil Laddha 2011-11-28 06:49:53 UTC
Please feel free to reopen this bug if the problem still occurs with a newer
version of Evolution.