WM files and metadata.xml remains when deleting resource??

93 views
Skip to first unread message

k.j...@kmjeuro.com

unread,
Oct 10, 2011, 4:21:31 AM10/10/11
to ResourceSpace
Hi,

when i delete a resource the folder:

0_1e469bcc4847a2e

and the files:

metadump.xml
50thm_wm_df2733daac3999a.jpg
50scr_wm_8c3bb7672ee0493.jpg
50pre_wm_bc38a11247c7ab8.jpg
50col_wm_600a93cd8a621a0.jpg

remains. Does somebody have a patch to this one. Really run into
troubles with it. (4.3.2912)

Thank you,

Karl

David Dwiggins

unread,
Oct 10, 2011, 11:52:36 AM10/10/11
to resour...@googlegroups.com
I think I've known about the metadump file being left for a while. But
I'm not sure what the other (WM) files are. Anyone?

One option would be to simply delete the resource folder entirely when
someone deletes a resource. Would there be unintended consequences if
we did this?

-David

> --
> You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
> To post to this group, send email to resour...@googlegroups.com.
> To unsubscribe from this group, send email to resourcespac...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.
>
>

Jeff Harmon

unread,
Oct 10, 2011, 1:22:02 PM10/10/11
to resour...@googlegroups.com
I'd be mindful of the difference between the "deleted state" vs. true deletion, certainly! It's a config option.

Jeff

--
Jeff Harmon
Chief Executive Officer
Colorhythm LLC
http://www.colorhythm.com

Main Office: +1 415-399-9921
Fax: +1 253-399-9928
Mobile: +1 510-710-9590

jha...@colorhythm.com

David Dwiggins

unread,
Oct 10, 2011, 1:35:40 PM10/10/11
to resour...@googlegroups.com
Right, only talking about true deletion, obviously.

k.j...@kmjeuro.com

unread,
Oct 10, 2011, 1:40:21 PM10/10/11
to ResourceSpace
I am mid in looking to find an fast solution because i am in the
process of uploading around 85000 resources to the server and i need
to have a clear folder/file structure which doesnt have any files on
disk which not in the database.

function delete_resource($ref) in resource_functions.php should do
everything but unlink of watermarked files and metadump.xml is not in
this function.

removing the full folder would for sure be the best solution, because
this makes it impossible to forget files.

Karl

k.j...@kmjeuro.com

unread,
Oct 10, 2011, 4:30:58 PM10/10/11
to ResourceSpace
I changed it that way to solve my actual problem. better solutions
welcome :-)

## start diff ##
--- resource_functions.php.ORIG 2011-10-06 09:21:18.000000000 -0600
+++ resource_functions.php 2011-10-10 15:40:43.000000000 -0600
@@ -783,6 +783,13 @@
foreach ($sizes as $size)
{
if (file_exists($size['path']))
{unlink($size['path']);}
+ # this sould correct the problem wm files
remains after deleting a resource.
+ # we should prepare a script deleting empty
folders from time to time:
+ $wmfile=get_resource_path($ref,true,
$size['id'],false,$extension,-1,1,true);
+ if (file_exists($wmfile)) {unlink($wmfile);}
+ # this sould correct the problem metadump.xml
files remains after deleting a resource.
+
$mdxmlfile=dirname(get_resource_path($ref,true,"pre",true)) . "/
metadump.xml";
+ if (file_exists($mdxmlfile))
{unlink($mdxmlfile);}
}
}


## end diff ##

Yann Gautier

unread,
Oct 21, 2013, 9:57:23 AM10/21/13
to resour...@googlegroups.com
Anyone found a fix to this one?..
Reply all
Reply to author
Forward
0 new messages