Changeset 10198


Ignore:
Timestamp:
2005-07-01T11:56:26+12:00 (19 years ago)
Author:
kjdon
Message:

I had a disaster - tried to use the gli applet to build a new collection and it deleted all teh contents of my collections on the server. fault in the delete files and delete metadata commands - it tries to cd to a directory and delete eveything in there, but it can't do that if the directpory doesn't exist, so it just stays in teh current directory (collect) and deletes all files there. have put a bandaid on it for now, but need to remember this when do the cross platform java version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/cgi-bin/upload

    r9898 r10198  
    5959    }
    6060    elsif($delete eq "files") {
    61     `cd $gsdlhome/collect/$col_dir; find -not -name "metadata.xml" -exec rm {} \\;`;
     61    if (-e "$gsdlhome/collect/$col_dir") {
     62        `cd $gsdlhome/collect/$col_dir; find -not -name "metadata.xml" -exec rm {} \\;`;
     63    }
    6264    }
    6365    elsif($delete eq "metadata") {
    64     `cd $gsdlhome/collect/$col_dir; find -name "metadata.xml" -exec rm {} \\;`;
     66    if (-e "$gsdlhome/collect/$col_dir") {
     67        `cd $gsdlhome/collect/$col_dir; find -name "metadata.xml" -exec rm {} \\;`;
     68    }
    6569    }
    6670
Note: See TracChangeset for help on using the changeset viewer.