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

Re: Why won't Deluge delete containing folders?

Post by discmeister »

Just checked. File is being created by user deluge, in group deluge, with the permissions: drwxrwxrwx

That should be good enough, no?

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 for you, Cas.

Up to this point, I have been trying to download files into a folder called /Server/Downloads. It's on a secondary hard disk - and is also shared to other machines (laptops etc) by a couple of shares, AFP and SMB.

This folder is the one giving me the problem where Deluge won't delete any of the containing folders.

This evening, just as an experiment, I created a regular folder on the system disk. Called it /Downloads. Chowned it to the same user who is running Deluge. Then told Deluge, via the WebUI, to download files to /Downloads.

It did. And sure enough, it then deletes the folder when told to delete all data. It also does this even when I move a file from within the containing folder. Perfect behaviour.

So the question is: could there be something to do with the AFP and SMB shares that's stopping Deluge from doing the job properly on deleting folders?

I've since moved the downloads folder back to the original /Server/Downloads, but NOT logged in via any laptops etc. And it behaves perfectly again (I can check by SSH'ing into the machine). HOWEVER, as soon as I log into the AFP share from my laptop, it goes back to its same old tricks: deletes the files, not the containing folder.

Any suggestions? Thanks again for your patience and help with this. I think we're getting closer!

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 »

Have you checked for hidden files in the remaining folder? I am thinking mainly of .ds_store files that Macs liberally spread everywhere.

Edit: The same issue can occur with thumbs.db from Windows machines: http://forum.xbmc.org/showthread.php?tid=30834
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: Why won't Deluge delete containing folders?

Post by discmeister »

Ah. Now there's a point. I'll do some checks, but I suspect that there will be .ds_store files in there.

Would they be enough for Deluge to trip up and hold back from deleting the containing folder?

I'm away from the test server for a day or so, but will try ASAP. There are some pretty simple commands to stop Macs from adding .ds_store files on network drives anyway, so if that IS the problem, then it could be an easy fix. We're getting there, perhaps...

Thanks again for your thoughts, and patience.

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 »

Bit more Googling this morning - although not being able to try out the theory is driving me nuts! I can find similar problems involving .ds_store files with utorrent and transmission - https://trac.transmissionbt.com/ticket/3732

I think the way round it is to stop the Mac and PC from leaving the files there in the first place, of course. But just so you can see it is a recognised issue elsewhere!

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 »

I think it should be possible to add an option to Deluge to remove those files before the libtorrent call to delete the torrent data.
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 notice other developers - uTorrent in particular - have turned down this request. But then, uTorrent is barely being touched on Linux these days anyway (which is one of the reasons I came here!).

Perhaps, if it does turn out that this is the problem, a brief description in the FAQ or something to explain why it's happening and how it can be avoided?

Anyway, let's walk before we can run. First, let's make sure it IS the .ds_store problem that's causing my glitch. Though I'm increasingly convinced that it must be...

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 »

Gutted - just tried this now, Cas, and it makes precisely no difference. Basically if I'm not logged into the AFP share, it looks like Deluge will delete everything. The moment I log into the AFP share and have even the parent Downloads folder open in my Apple laptop's Finder, it leaves the empty directory.

Could there be something else to do with permissions on the share that's screwing it up the moment something logs in?

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 »

I need to double-check, Cas; I'm running Mountain Lion and apparently the widely circulated Terminal command to stop .ds_store creation on network shares doesn't work beyond 10.7. I've found an app that claims to do it for the latest OS, though, so I'll try it again tonight. It could be that even after I thought I'd told my Mac to stop spreading the files around, it was still doing so...

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 »

Have you not actually checked for the files? Use the following to list files including hidden on ubuntu:

Code: Select all

ls -a
Post Reply