Jump to content

can't delete folders if they're not empty


Recommended Posts

Posted

Hi,

I don't know if this is a "feature", but if it is it should be optionable. The problem is that I've tv shows in their folders and I'd like to delete a show or a season when I finished to watch it. I can't do that if I don't remove episodes one by one until the folder is empty, only when the directory is empty I can delete it. If I try to delete a folder when it is full of files I get the directory is not Empty error.

I upload my log so you can check the error.

I want to specify that the write permissions on the folder and on the files are  drwxrwxrwx+

image.png.a1d44466c66e872a7108ea24092cbdc2.png

embyserver.txt

Posted

Have you tried deleting the season folders first?

Posted

Hi Carlo, 

The TV Shows in the example has only one season on my Emby server, than I tried to delete only the show directly, but yes, I tried to delete also a single season from other shows but the result is the same.

I think there is a problem with access permissions, because, other TV series that reside on a usb disk, do not have the same problem. I can delete without any problems.
The thing is strange because the library I defined points to a nas that has a dedicated user to connect to the shared folders and that user has all RW permissions on those shares.

Posted (edited)

Updated

 

Were there perhaps some hidden system files in the directory ? 

     System.IO.IOException: System.IO.IOException: Directory is Not Empty: 192.168.2.2\STORAGE\SERIE\The Boys

eg Thumbs.db or @eaDir etc ?

Could you upload here a full directory listing for the path in the error message - including hidden and system files

 

Sorry - ignore my post. You already said the episodes are there !

Quote

I can't do that if I don't remove episodes one by one until the folder is empty

 

So it works if you delete each episode after you watch it but it does not work if you don't delete the episode and then later after watching the other episodes you come and delere the show or season - and it does not work. If that is the case then it sounds like we need to delete the episodes first and then the season when the a request to delete a season is made

Edited by sa2000
Posted (edited)

Yes, sa2000, I've a @eaDir in that folder and this is strange because on my synology nas I don't use MediaServer or Photostation, that should be the "guilty" of the creation of that dir... How can I get rid of this?

 

image.thumb.png.e4ea760bf2ccbd6f44b8aaf8ba3b88e6.png

Edited by mmoz77
Posted

Ok, I found a work around to delete @eaDir in a cron job, now my directory listing is the following, but Emby still says that directory is not empty... and it's right, but is full of file that it should be able to delete... like it does on the usb connected drive 🥲

image.thumb.png.e732d5321ccdbbdf0cae062dfadc6eb7.png

Posted

I have tested Season and TV Shows deletions on one of my servers - one on beta 4.9.0.30 and it worked fine. Deleting the Season from within Emby Web context menu, worked fine and deleted all the episodes first and then the season. Then I did a test of deleting the show and that deleted the episodes for the 2nd season and the second season and then deleted the show folder

The difference is that my media paths were mapped network drives and not smb and that it was on the beta. The other difference is that my tests were on windows

I will repeat the test on 4.8.10.0 and if that works then it might be an issue with smb paths 

Could you do a test with a test tv library with direct media paths to a show and season with just a couple of episodes and see if that works

 

 

Posted

@mmoz77I have done two further tests - both on Emby Server 4.8.10.0 - one on Windows and one on a NAS which should be similar to your Linux environment

Both tests were successful 

Could you do the following

- Enable Debug Logging in server settings for Logs 

- Restart the server

- Create two test libraries for TV shows with just one show and one season folder and episodes in each - Have one library with a local folder path to the test media and the other library with SMB path to the media

- Get screenshots of both TV shows as they appear in Emby Web - just to confirm that the emby server has them as shows and episodes

- Then in Emby Web app context menu delete the one show that has the local folder path and see if that works

- At the end of this action - get a directory listing of the TV show folder and folders below it

- Then in Emby Web open the context menu for the show that is in the test library with the smb path and delete the show

- At the end - note deletion when it works may take a while to complete - get a directory listing of the show and folders below it

- Upload the lists and screenshots and the emby server log

 

 

 

Posted (edited)

I should made what you asked.

definition of test samba library

image.thumb.png.302b1f96c71be451da85d6182059f8df.png

 

definition of test local library

image.thumb.png.707bdf6c53f72f75bdcf725f8b643d6f.png

 

how emby sees my testsamba lib

image.thumb.png.851329fccc6c756dacd86ed0aec3853e.png

 

and how sees testlocal

image.thumb.png.8ca9c36a7be3c9abeafc44604de069d1.png

Content of TESTLOCAL after the deletion of the show (I'm inside the docker image running)

image.png.c6b8d7a8cc6ab20eb0894d8890bbee78.png

 

Content of TESTSAMBA after the unsuccessful deletion of the show (I'm on the NAS, mulo is the user that Emby use to connect via samba)

image.png.b611b25deb7d51e1bec74ca8e7b570dd.png

 

The deletion error 

image.thumb.png.dfefb956496c78f6d10fae9e616f980f.png

embyserver (1).txt

 

 

Edited by mmoz77
wrong screenshot
Posted
7 hours ago, mmoz77 said:

I should made what you asked.

Thanks for doing the test. So the issue is only for smb paths where we are not removing the child media items before removing the parent

I will pass it to the development team. I cannot say at this stage if this is an smb restriction.

 

Posted

HI, yes we are looking into this. Thanks.

  • 4 weeks later...
Posted

@mmoz77FYI This has been fixed in the new Emby Server beta released today - 4.9.0.32. I don't know when that will make it into the public release. 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...