Automatic cleanup?
- abu
- Ssr. Bludit
- Posts: 16
- Joined: Mon Sep 12, 2022 9:23 pm
- Location: Switzerland
- Has thanked: 6 times
- Been thanked: 6 times
Is there an automatic cleanup procedure for /bl-content/uploads/pages?
Over the time, I got tons of empty directories and dead links there, including all autosave-* directories. Do I really have to remove them manually?
Over the time, I got tons of empty directories and dead links there, including all autosave-* directories. Do I really have to remove them manually?
- Edi
- Site Admin
- Posts: 3100
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 74 times
- Been thanked: 108 times
- Contact:
Empty directories and dead links of what? Deleted content?abu wrote: Sat Mar 08, 2025 4:00 pm Over the time, I got tons of empty directories and dead links there, including all autosave-* directories.
aufbruch1900.ch, Plattform zu Kunst und Kultur um 1900
- abu
- Ssr. Bludit
- Posts: 16
- Joined: Mon Sep 12, 2022 9:23 pm
- Location: Switzerland
- Has thanked: 6 times
- Been thanked: 6 times
There is indeed a dead link remaining after deleting a post.
I've created an issue for this.
https://github.com/bludit/bludit/issues/1597
- abu
- Ssr. Bludit
- Posts: 16
- Joined: Mon Sep 12, 2022 9:23 pm
- Location: Switzerland
- Has thanked: 6 times
- Been thanked: 6 times
And here comes my one-liner fix.
Code: Select all
The following changes since commit 3c02c864989aad0f3065faf296f99baeb1dc16ad:
feat: new bludit version with bug fix for php 5 (2024-08-25 10:11:57 +0200)
are available in the Git repository at:
git@codeberg.org:abu/bludit.git fix/symlink
for you to fetch changes up to 5f507f9b402867f6a12d681c31d3ec4fee2e11ba:
fix: Remove invalidated symlink (2025-03-15 05:34:59 +0100)
----------------------------------------------------------------
Alfred Bühler (1):
fix: Remove invalidated symlink
bl-kernel/pages.class.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php
index 28401e9f..c278242b 100644
--- a/bl-kernel/pages.class.php
+++ b/bl-kernel/pages.class.php
@@ -330,6 +330,7 @@ class Pages extends dbJSON
if (Filesystem::deleteRecursive(PATH_UPLOADS_PAGES . $uuid) === false) {
Log::set(__METHOD__ . LOG_SEP . 'Directory with images not found ' . PATH_UPLOADS_PAGES . $uuid);
}
+ FileSystem::rmfile(PATH_UPLOADS_PAGES . $key);
}
// Remove from database

