forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: JasonB on August 07, 2005, 07:02:22 am

Title: Can't remove non-existing pictures from non-existing Album directory.
Post by: JasonB on August 07, 2005, 07:02:22 am
This may seem silly, however I think it's a problem.  If I delete a picture, and its thumbnails, from disk and then go to the album to remove it from the gallery all is well (it does it, after having first displayed just the picture title rather than a thumb).  But if I delete the entire directory from disk, then go to the Album and try to delete a picture (or all pictures) I get the following error: "Directory 'albums/[Category]/[Album]/' is not writable, files can't be deleted", where [Category] and [Album] are replaced by the actual directory names.

Why does the deletion succeed if all of a picture's files are missing, but fail if the directory itself is missing?  What is it trying to do differently in both circumstances?  In any case, if the file isn't there for whatever reason, then it should silently (without an error) simply remove the entry from the gallery.

Note: I know that it makes more sense to just delete directly from the gallery itself.  However, I came across this because I'll frequently rename files.  To do this, I move the files elsewhere (so that they aren't "really" deleted), delete them from the gallery, rename the files, move them back, then batch add them in again (with the new filenames).

It would be nice if there were a "remove from gallery" option that would be like delete, except that it wouldn't touch the file system itself - rather it would just take the entry out of the database...
Title: Re: Can't remove non-existing pictures from non-existing Album directory.
Post by: Joachim Müller on August 07, 2005, 09:53:43 am
you're not meant to remove files physically (using FTP) once they exist in coppermine's database. Please refer to the docs. Makring as "invalid"
Title: Re: Can't remove non-existing pictures from non-existing Album directory.
Post by: skidpics on July 09, 2007, 05:41:33 am
Very true on the no deleting of files via FTP - However, I have the same problem, as I deleted my albums directory.. 

Easy way to fix the problem of deleting it appears, is to go to edit the properties of each album, scroll to the bottom and click the remove all files from the album.  NEXT, you can delete the album on the next step.. Without deleting the files (that are not there), you cannot delete the album..

Kinda weird you have to do it in 2 steps, rather than just with the album admin and deleting the albums.  If the pics are missing, it will not let you do it any other way...
Title: Re: Can't remove non-existing pictures from non-existing Album directory.
Post by: Dia on May 07, 2008, 08:15:57 pm
Thanks Skidpics. I made the same mistake, I guess you don't know it's one until you get the error message, but I followed your advice and got it fixed. You go to album properties, all the way down to irreversibly delete files and once it allows you to do that you can delete the entire album.

Title: Re: Can't remove non-existing pictures from non-existing Album directory.
Post by: Joachim Müller on May 08, 2008, 08:29:00 am
Locking.