lib/delta/delta.js
function renameConflictNode(newParent, oldPath, name, node, conflictingNode, callback) {
  var newLocalName = utility.renameConflictNode(newParent, name);

  try {
    fsWrap.renameSync(oldPath, utility.joinPath(newParent, newLocalName));
  } catch(err) {
    return renameRemoteNode(node, name, callback);
  }

  conflictingNode.name = newLocalName;

  conflictingNode.localActions = conflictingNode.localActions || {};

  if(!conflictingNode.localActions.create && !conflictingNode.localActions.rename) {
    //rename the node if not localy created or localy renamed (always keep original local rename actions)
    conflictingNode.localActions.rename = {immediate: false, actionInitialized: new Date(), oldName: name};
  }

  return syncDb.update(conflictingNode._id, conflictingNode, callback);
}
function renameConflictNode(newParent, oldPath, name, node, conflictingNode, callback) {
  var newLocalName = utility.renameConflictNode(newParent, name);

  try {
    fsWrap.renameSync(oldPath, utility.joinPath(newParent, newLocalName));
  } catch(err) {
    return renameRemoteNode(node, name, callback);
  }

  conflictingNode.name = newLocalName;

  conflictingNode.localActions = conflictingNode.localActions || {};

  if(!conflictingNode.localActions.create && !conflictingNode.localActions.rename) {
    //rename the node if not localy created or localy renamed (always keep original local rename actions)
    conflictingNode.localActions.rename = {immediate: false, actionInitialized: new Date(), oldName: name};
  }

  return syncDb.update(conflictingNode._id, conflictingNode, callback);
}
function renameConflictNode ( newParent , oldPath , name , node , conflictingNode , callback ) { var newLocalName = utility . renameConflictNode ( newParent , name ) ; try { fsWrap . renameSync ( oldPath , utility . joinPath ( newParent , newLocalName ) ) ; } catch ( err ) { return renameRemoteNode ( node , name , callback ) ; } conflictingNode . name = newLocalName ; conflictingNode . localActions = conflictingNode . localActions || { } ; if ( ! conflictingNode . localActions . create && ! conflictingNode . localActions . rename ) { //rename the node if not localy created or localy renamed (always keep original local rename actions) conflictingNode . localActions . rename = { immediate : false , actionInitialized : new Date ( ) , oldName : name } ; } return syncDb . update ( conflictingNode . _id , conflictingNode , callback ) ; }
renames a conflict file

@param {string} newParent - new parent of the file
@param {Object} oldPath - old path of the file
@param {string} name - current name of the file
@param {Object} node - node A from database
@param {Object} conflictingNode - node B conflicting with node A from database
@param {Function} callback - callback function
@returns {void} - no return value
renames a conflict file