Ignore:
Timestamp:
2020-07-11T09:46:29+12:00 (4 years ago)
Author:
ak19
Message:

Bugfix to the problem of a file that's being moved into its own location being clobbered on remote. In client-GLI, things would look okay, but when you try doing something with the file or reopen the collection, you notice that the file went missing from the collection. Now the remote code simply doesn't try moving a file if it's going into the same location it already is in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/cgi-bin/gliserver.pl

    r34160 r34262  
    10371037    }
    10381038
     1039    # don't bother moving the file into the same location
     1040    # Plus attempting to do so ends up clobbering the file on the server side
     1041    if(&util::get_parent_folder($source_file) eq $target_file) {
     1042    $gsdl_cgi->generate_ok_message("Collection file $source_file is already inside $target_file. Not moving on itself.");
     1043    return;
     1044    }
     1045   
    10391046    # Ensure the user is allowed to edit this collection
    10401047    &authenticate_user($gsdl_cgi, $username, $collection, $site);
Note: See TracChangeset for help on using the changeset viewer.