- Timestamp:
- 2003-10-23T11:05:18+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r5595 r5719 259 259 break; 260 260 case 3: // No To All 261 261 cancel_action = true; 262 262 case 2: // No 263 263 default: 264 ready = false; 264 ready = false; 265 // Increment progress by size of potentially copied file 266 progress.addValue(origin_node.getFile().length()); 265 267 } 266 268 } … … 467 469 } 468 470 else { 469 metadatum = Gatherer.c_man.getCollection().gdm.removeMetadata(origin_node.getFile());470 } 471 // determine it parent node471 metadatum = Gatherer.c_man.getCollection().gdm.removeMetadata(origin_node.getFile()); 472 } 473 // determine its parent node 472 474 FileNode parent_record = (FileNode)origin_node.getParent(); 473 475 // Remove from model … … 477 479 FileNode recycled_parent = null; 478 480 if(job.type == FileJob.DELETE) { 481 482 /** If we ever decide to reenable undo then this code will have to be seriously improved. 479 483 // See if this record already has a previous recycle folder noted in the recycle folder mappings. 480 484 recycled_parent = (FileNode) recycle_folder_mappings.get(origin_node); … … 506 510 } 507 511 Gatherer.c_man.undo.addMetadata(source_file, metadatum); 512 **/ 508 513 } 509 514 // delete the source file 510 515 Utility.delete(source_file); 516 /** 511 517 // create undo job as necessary. File move would have been handled above. 512 518 if(job.undoable) { … … 517 523 recycled_parent = null; 518 524 recycled_file = null; 525 **/ 519 526 //metadatum = null; 520 527 } … … 526 533 // Don't worry about all this for true file move actions. 527 534 if(job.type == FileJob.DELETE) { 535 /** Again, if we reenable undo then this code must be debugged. 528 536 // See if this record already has a previous recycle folder noted in the recycle folder mappings. 529 537 FileNode parent = (FileNode) recycle_folder_mappings.get(origin_node); … … 557 565 recycle_folder_mappings.put(child_record, recycle_folder_record); 558 566 } 559 } 567 } 568 **/ 560 569 } 561 570 // Requeue a delete job -after- the children have been dealt with. Remember I've reversed the direction of the queue so sooner is later. Te-he. Also have to remember that we have have followed this path to get here for a move job: Copy Directory -> Queue Child Files -> Delete Directory (must occur after child files) -> Queue Directory.
Note:
See TracChangeset
for help on using the changeset viewer.