Renamed files keep the old name as description when they are already assigned to a file field because this module does not update the filename column in the file_managed table. Can someone please change the imce_rename_file so it updates the filename too? It is as simple as moving a line of code before the call to file_move:

function imce_rename_file(&$imce, $old_uri, $new_uri) {
  ...
  ...
  $file->filename = drupal_basename($new_uri); // New line
  $move = file_move($file, $new_uri, FILE_EXISTS_ERROR);
  
  $file->uri = $new_uri;
  //$file->filename = basename($file->uri); // Old line
  ...
  ...
}

Comments

jacmkno created an issue. See original summary.

jacmkno’s picture

Issue summary: View changes
jacmkno’s picture

Issue summary: View changes