Ignore:
Timestamp:
2020-07-11T08:00:38+12:00 (4 years ago)
Author:
ak19
Message:
  1. Fixed the bug with GLI's Gather Rightclick > Replace when the replacement file and the file being replaced had the same name. Things mostly worked, including in the remote case: when the filenames were the same or different, the files would get correctly transferred, retaining meta, to the remote GS. But if the files were the same name, then in (client)GLI the file ends up lost unless it's client-GLI, in which case reopening the collection transferred the correct new file across with meta. This bugfix ensures that nothing is lost in GLI or client-GLI and that no reopening of client-GLI is necessary to fix it. The final fix ended up far easier than all my initial ways of solving it which failed to work (like renaming the src file temporarily while copying the identically named target across). 2. DebugStream error msg visibility can now be toggled on and off and prints START DEBUGGING to END DEBUGGING messages with caller name for the section of code where it's toggled on. This came in handy when debugging this time, so leaving it in for future use.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/DebugStream.java

    r31692 r34261  
    5757    }
    5858
     59
     60    static public void setDebugging(boolean isEnabled, String caller) {
     61    if(isEnabled) {
     62        System.err.println("**** START DEBUGGING (enabled by: " + caller + ")");
     63    } else {
     64        System.err.println("**** END DEBUGGING (called by: " + caller + ")");
     65    }
     66    debugging_enabled = isEnabled;
     67    }
    5968
    6069    static synchronized public boolean isDebuggingEnabled()
Note: See TracChangeset for help on using the changeset viewer.