Changeset 24636 for main/trunk/gli
- Timestamp:
- 2011-09-23T13:37:54+12:00 (13 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r23433 r24636 485 485 File new_coll_subdir = new File(new_coll_dir, dir_name); 486 486 new_coll_subdir.mkdirs(); 487 Gatherer.f_man.getQueue().copyDirectoryContents(subdir, new_coll_subdir); 487 // Copy with force overwrite, since it's a new collection that's currently 488 // being created and won't have anything in it but at most modelcol stuff 489 Gatherer.f_man.getQueue().copyDirectoryContents(subdir, new_coll_subdir, true); 488 490 } 489 491 catch (Exception e) { -
main/trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r22605 r24636 727 727 * @see org.greenstone.gatherer.Gatherer 728 728 */ 729 public void copyDirectoryContents(File source, File destination )729 public void copyDirectoryContents(File source, File destination, boolean overwrite) 730 730 throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException 731 731 { … … 741 741 File new_file = new File(destination, f_name); 742 742 if (f.isDirectory()) { 743 copyDirectoryContents(f, new_file );743 copyDirectoryContents(f, new_file, overwrite); 744 744 } else if (f.isFile()) { 745 copyFile(f, new_file, false); 746 } 747 } 745 copyFile(f, new_file, overwrite); 746 } 747 } 748 } 749 750 /** Preserving old default behaviour of copyDirContents method, where overwrite is false. */ 751 public void copyDirectoryContents(File source, File destination) throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException 752 { 753 copyDirectoryContents(source, destination, false); 748 754 } 749 755
Note:
See TracChangeset
for help on using the changeset viewer.