Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

#11740 closed defect (wontfix)

Deleting the last attachment of a wiki page does not delete the respective attachment folder

Reported by: Francesca Mazzoni <francesca.mazzoni@…> Owned by:
Priority: normal Milestone:
Component: attachment Version: 0.12.5
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Jun Omae)

I'm on Debian stable with Python 2.7.3 and installed from Debian package.

When I delete an attachment from a Wiki page that contains only that attachment, the (empty) folder in which the attachment was stored remains in the filesystem.

Steps to reproduce:

1) Create a new wiki page (say MyPage), add an attachment (say MyAttach.tgz). The attached file is stored in <trac-env>/attachments/wiki/MyPage/MyAttach.tgz.

2) Delete the attachment, thus leaving the page without attachments.

I still have the <trac-env>/attachments/wiki/MyPage folder.

I think that the folder should be removed, since it is empty.

Attachments (0)

Change History (4)

comment:1 by Francesca Mazzoni <francesca.mazzoni@…>, 10 years ago

Description: modified (diff)

comment:2 by Jun Omae, 10 years ago

Component: wiki systemattachment
Description: modified (diff)
Keywords: attachment removed

comment:3 by Jun Omae, 10 years ago

When concurrent adding and removing a attachment, the adding a attachment would sometimes fail due to the removing its parent directory.

I don't think its parent directory should be removed even if empty. I consider that behavior is by design. Propose to close as a wontfix.

comment:4 by Jun Omae, 10 years ago

Resolution: wontfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.