Changeset 25074


Ignore:
Timestamp:
02/13/12 13:47:58 (9 years ago)
Author:
sjm84
Message:

Fixed a problem with deleting documents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSDocumentModel.java

    r24993 r25074  
    216216        if (!section)
    217217        {
    218             File dirToDelete = new File(_siteHome + File.separatorChar + "collect" + File.separatorChar + collection + File.separatorChar + "archives" + File.separatorChar + oid);
     218            String archivesFile = archiveGetDocumentFilePath(oid, collection, userContext);
     219            String archivesFolder = archivesFile.substring(0, archivesFile.lastIndexOf(File.separator));
     220            File dirToDelete = new File(archivesFolder);
    219221
    220222            if (!dirToDelete.exists() || !dirToDelete.isDirectory() || !deleteDirectory(dirToDelete))
Note: See TracChangeset for help on using the changeset viewer.