directories not deleted on server when a video is deleted #1769

Closed
opened 2026-10-05 00:56:10 +02:00 by adam · 6 comments
Owner

Hi,

  • upload a video to the server from a mobile phone under IOS
  • delete the video from the application under IOS

Why the directories are not deleted on the piwigo server?
There are still there, even empty?
Thank you

 $ ls -lalrtR 11
11:
total 16
drwxrwxrwx 5 www-data www-data 4096 Nov  3 11:35 ..
drwxrwxrwx 4 www-data www-data 4096 Nov  7 08:41 .
drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:12 07
drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:34 03

11/07:
total 16
-rw-rw-rw- 1 www-data www-data   12 Nov  7 08:41 index.htm
drwxrwxrwx 4 www-data www-data 4096 Nov  7 08:41 ..
drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:12 .
drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:12 pwg_representative

11/07/pwg_representative:
total 12
-rw-rw-rw- 1 www-data www-data   12 Nov  7 08:41 index.htm
drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:12 ..
drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:12 .

11/03:
total 16
-rw-rw-rw- 1 www-data www-data   12 Nov  3 11:35 index.htm
drwxrwxrwx 4 www-data www-data 4096 Nov  7 08:41 ..
drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:34 pwg_representative
drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:34 .

11/03/pwg_representative:
total 12
-rw-rw-rw- 1 www-data www-data   12 Nov  3 11:35 index.htm
drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:34 ..
drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:34 .

IOS : mobile apple 7 plus with latest testflight version 3.1 (540
Piwigo server : 13.8.0 under raspberry pi 4 Model B Rev 1.4 under OS Raspbian GNU/Linux 11 (bullseye) aarch64

Hi, - upload a video to the server from a mobile phone under IOS - delete the video from the application under IOS Why the directories are not deleted on the piwigo server? There are still there, even empty? Thank you ``` $ ls -lalrtR 11 11: total 16 drwxrwxrwx 5 www-data www-data 4096 Nov 3 11:35 .. drwxrwxrwx 4 www-data www-data 4096 Nov 7 08:41 . drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:12 07 drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:34 03 11/07: total 16 -rw-rw-rw- 1 www-data www-data 12 Nov 7 08:41 index.htm drwxrwxrwx 4 www-data www-data 4096 Nov 7 08:41 .. drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:12 . drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:12 pwg_representative 11/07/pwg_representative: total 12 -rw-rw-rw- 1 www-data www-data 12 Nov 7 08:41 index.htm drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:12 .. drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:12 . 11/03: total 16 -rw-rw-rw- 1 www-data www-data 12 Nov 3 11:35 index.htm drwxrwxrwx 4 www-data www-data 4096 Nov 7 08:41 .. drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:34 pwg_representative drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:34 . 11/03/pwg_representative: total 12 -rw-rw-rw- 1 www-data www-data 12 Nov 3 11:35 index.htm drwxrwxrwx 3 www-data www-data 4096 Nov 11 14:34 .. drwxrwxrwx 2 www-data www-data 4096 Nov 11 14:34 . ``` IOS : mobile apple 7 plus with latest testflight version 3.1 (540 Piwigo server : 13.8.0 under raspberry pi 4 Model B Rev 1.4 under OS Raspbian GNU/Linux 11 (bullseye) aarch64 <!-- github-sync-id:1988955550 -->
adam closed this issue 2026-10-05 00:56:10 +02:00
Author
Owner

Perfectly normal. I mean it's exactly the way Piwigo is coded to behave.

Are a few empty directories a problem?

Perfectly normal. I mean it's exactly the way Piwigo is coded to behave. Are a few empty directories a problem? <!-- github-comment-id:1810279190 -->
Author
Owner

Hi @plegall,
Ok works as design
Hhowever:
-create a directory when it is needed is perfect, of course,
-not delete a directory when it is no more needed: why?
From my point of view, this can be an enhancement to avoid empty directories otherwise this is dirty.
kr

Hi @plegall, Ok works as design Hhowever: -create a directory when it is needed is perfect, of course, -not delete a directory when it is no more needed: why? From my point of view, this can be an enhancement to avoid empty directories otherwise this is dirty. kr <!-- github-comment-id:1810343020 -->
Author
Owner

Unless you can prove there is a security issue by not deleting the remaining empty directory, I don't see the point of doing this. I don't feel dirty at all when I don't remove an empty directory.

Unless you can prove there is a security issue by not deleting the remaining empty directory, I don't see the point of doing this. I don't feel dirty at all when I don't remove an empty directory. <!-- github-comment-id:1818770677 -->
Author
Owner

ok - I think like a linux guy not a windows one. If a directory is not used and empty, I delete it, but I understand your point of view.

ok - I think like a linux guy not a windows one. If a directory is not used and empty, I delete it, but I understand your point of view. <!-- github-comment-id:1819735198 -->
Author
Owner

closed

closed <!-- github-comment-id:1819735666 -->
Author
Owner

I haven't used Windows for maybe 17 years and I still don't see the problem of an empty directory ;-)

I haven't used Windows for maybe 17 years and I still don't see the problem of an empty directory ;-) <!-- github-comment-id:1819891164 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1769