Changeset 5719 for trunk


Ignore:
Timestamp:
2003-10-23T11:05:18+13:00 (21 years ago)
Author:
jmt12
Message:

Fixed little bug where not overwriting a file caused the progress bar to become inconsistant. Also commented out undo file movement code since undo isn't supported at the moment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r5595 r5719  
    259259                    break;
    260260                case 3: // No To All
    261                     cancel_action = true;
     261                   cancel_action = true;
    262262                case 2: // No
    263263                default:
    264                     ready = false;
     264                   ready = false;
     265                   // Increment progress by size of potentially copied file
     266                   progress.addValue(origin_node.getFile().length());
    265267                }
    266268                }
     
    467469                }
    468470                else {
    469                 metadatum= Gatherer.c_man.getCollection().gdm.removeMetadata(origin_node.getFile());
    470                 }
    471                 // determine it parent node
     471                metadatum = Gatherer.c_man.getCollection().gdm.removeMetadata(origin_node.getFile());
     472                }
     473                // determine its parent node
    472474                FileNode parent_record = (FileNode)origin_node.getParent();
    473475                // Remove from model
     
    477479                FileNode recycled_parent = null;
    478480                if(job.type == FileJob.DELETE) {
     481
     482                   /** If we ever decide to reenable undo then this code will have to be seriously improved.
    479483                // See if this record already has a previous recycle folder noted in the recycle folder mappings.
    480484                recycled_parent = (FileNode) recycle_folder_mappings.get(origin_node);
     
    506510                }
    507511                Gatherer.c_man.undo.addMetadata(source_file, metadatum);
     512                   **/
    508513                }
    509514                // delete the source file
    510515                Utility.delete(source_file);
     516                /**
    511517                // create undo job as necessary. File move would have been handled above.
    512518                if(job.undoable) {
     
    517523                recycled_parent = null;
    518524                recycled_file = null;
     525                **/
    519526                //metadatum = null;
    520527            }
     
    526533                // Don't worry about all this for true file move actions.
    527534                if(job.type == FileJob.DELETE) {
     535                   /** Again, if we reenable undo then this code must be debugged.
    528536                // See if this record already has a previous recycle folder noted in the recycle folder mappings.
    529537                FileNode parent = (FileNode) recycle_folder_mappings.get(origin_node);
     
    557565                    recycle_folder_mappings.put(child_record, recycle_folder_record);
    558566                    }
    559                 }
     567                    }
     568                   **/
    560569                }
    561570                // 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.