Why won't Deluge delete containing folders?

General support for problems installing or using Deluge
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Why won't Deluge delete containing folders?

Post by discmeister »

Hi all,

I've just come back to Deluge after a year or so away using 'other torrenting software'. Wow, it's really moved on a lot - am loving it!

My system is a Ubuntu headless server (at the moment 12.04) and I'm running Deluge daemon 1.3.5. I have a peculiar query, but one that I'm hoping someone here can explain or solve?

Let's say, as an example, that I have downloaded a music recording via Deluge. All has gone well, and it has created the directory 'Title-of-the-music-recording' in my Downloads folder, with all of the mp3 files, album art and an nfo file therein. All fine, right?

If I suddenly decided that I didn't want this recording, before I'd altered any of its files, I can go to the Web GUI, select the torrent and then Delete All including Data. EVERYTHING will disappear from the Downloads folder: the mp3s, the album art, the nfo file AND the containing folder 'Title-of-the-music-recording'.

But let's say that it's a recording that I've really wanted - most commonly the case - and I create a folder in my Music directory elsewhere on the same disk. I create that folder with my own style of indexing - let's call it 'Album artist - Title-of-the-recording' - then move all of the mp3s across to it (I access the server files via an AFP share). I can then get on with renaming them or editing their meta data as I see fit.

What's left, back in my Downloads directory, is the 'Title-of-the-music-recording' folder, containing a JPEG or two, and the nfo file.

HOWEVER, if I now go to the Web GUI, select the torrent and then Delete All including Data, the JPEGs and the nfo file will be removed, but the containing folder will NOT.

I find this totally maddening - and it seems to be common to most torrenting software.

Is there a reason why this happens, and is there any way I can avoid it? I know there has been a plugin for Deluge that in theory could do it - DeletePartial? - but I've tried installing it via the Web GUI into 1.3.5 and nothing seems to happen (it doesn't get added to my list of plugins). Perhaps it doesn't work with 1.3.5?

Can anyone help?

Discy
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: Why won't Deluge delete containing folders?

Post by discmeister »

Further update to this. I've now installed and activated the plugin Delete Partials, although it never seems to stay installed... I'll raise that in the Plugins section.

In any case, whether it's activated or not, my earlier presumption that an 'untouched' torrent folder would be blitzed completely by Deluge's Delete All with Data command from the Web GUI is incorrect. In almost every case it leaves the folder.

Is this just me? I can't for the life of me understand why, when I ask Deluge to delete the torrent and the data, it leaves the directory!

Hope someone has an idea or a view on this!

Discy
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Why won't Deluge delete containing folders?

Post by Cas »

This is likely a libtorrent issue.

I think you need to clarify exactly the contents of the folder prior to deleting because the moving rather than copying of mp3's might contribute to the bug as libtorrent will expect all the files to be there unless you have re-checked.
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: Why won't Deluge delete containing folders?

Post by discmeister »

Hi Cas,

Thanks for the reply. In most cases, yes, I have moved the MP3s rather than copying them. So all that's left is usually a JPEG and maybe an NFO file.

However, this evening I tried it with a freshly downloaded and untouched torrent and while the folder contents were all deleted, MP3s and all, the containing directory remained.

Does the fact that it's probably a libtorrent issue mean that it's just one of those things I'll have to live with?!

Thanks for replying,

Discy
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: Why won't Deluge delete containing folders?

Post by discmeister »

Cas,

Just wondering if you've had any more thoughts on this? Is there any way of adjusting libtorrent so it deletes everything including torrent and data?

Kind regards,

Discy
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Why won't Deluge delete containing folders?

Post by Cas »

One thought is if a open file descriptor from another program when you are accessing these folders is preventing libtorrent removing the folder.

You could enable debug logging.
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: Why won't Deluge delete containing folders?

Post by discmeister »

You mean, for example, if I have the Downloads folder in question open on my laptop, which is remotely logged into the server via AFP? I'll try some different scenarios and see what happens - will try to get the debug log sorted out and post it here.

Thanks again for your patience and input. Will post back soon.

Kind regards,

Discy
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: Why won't Deluge delete containing folders?

Post by discmeister »

Hi Cas,

Sorry for the delay - it took me quite a while to work out how to do the logfile.

Anyway, here it is. I downloaded a legitimate torrent file to my usual Downloads folder. I was logged into the server via my AFP share, but didn't have the window of my Downloads folder open on my Mac laptop.

However, when I told Deluge via WebUI to delete the torrent AND remove the data, it only removed the files inside the folders, not the folders themselves.

I then redownloaded the files, and moved one of the MP3 files to another folder, and repeated the delete torrent + data action. Again, the folders were left.

This is the resulting deluge debug logfile. I hope you can make sense of it, because I can't?!

Hope you can help me understand this!

Discy
Attachments
delugelogfile.txt
(39.96 KiB) Downloaded 324 times
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Why won't Deluge delete containing folders?

Post by Cas »

This is not a problem that has been reported before and I run deluged on 12.04 and never seen this either. It suggests something in your setup is preventing the top level folder being removed.

Are the permissions on the containing folder allowing Deluge to delete them? Make sure to restart deluged if making any such changes.
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: Why won't Deluge delete containing folders?

Post by discmeister »

I'll check. Is this down to which user Deluge is running as, and which permissions it's creating the files with?

So you're saying that when you do a delete all including data, EVERYTHING disappears, yes?

Thanks again for your patience. Hopefully when we find a solution, somebody else will be able to benefit from it in the long run.

Discy
Post Reply