Changeset 25074

Show
Ignore:
Timestamp:
13.02.2012 13:47:58 (8 years ago)
Author:
sjm84
Message:

Fixed a problem with deleting documents

Files:
1 modified

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))