anchor.diff:  %%--------------------------------------------------------------------
   %% @doc Checks necessary permissions and renames file
   %%--------------------------------------------------------------------
  --spec rename_file(fslogic_worker:ctx(), fslogic_worker:file(), file_meta:path()) ->
  +-spec rename_file(fslogic_worker:ctx(), SourceEntry :: fslogic_worker:file(),
  +    CanonicalTargetPath :: file_meta:path(),
  +    LogicalTargetPath :: file_meta:path()) ->
       #fuse_response{} | no_return().
   -check_permissions([{?delete_object, {parent, 2}}, {?add_object, {parent, {path, 3}}}]).
  -rename_file(CTX, SourceEntry, TargetPath) ->
  -    case check_reg_preconditions(CTX, SourceEntry, get_canonical_path(CTX, TargetPath)) of
  +rename_file(CTX, SourceEntry, CanonicalTargetPath, LogicalTargetPath) ->
  +    case check_reg_preconditions(CTX, SourceEntry, CanonicalTargetPath) of
           #fuse_response{status = #status{code = ?OK}} ->
  -            rename_select(CTX, SourceEntry, TargetPath);
  +            rename_select(CTX, SourceEntry, CanonicalTargetPath, LogicalTargetPath);
           Error ->
               Error
       end.
  
positive.code: %%--------------------------------------------------------------------
  -spec rename_trivial(fslogic_worker:ctx(), fslogic_worker:file(),
      file_meta:path()) -> #fuse_response{} | no_return().
  rename_trivial(CTX, SourceEntry, TargetPath) ->
      rename_interspace(CTX, SourceEntry, TargetPath).
  
  %%--------------------------------------------------------------------
  %% @doc Renames file within one provider.
  %%--------------------------------------------------------------------
  -spec rename_interspace(fslogic_worker:ctx(), fslogic_worker:file(),
      file_meta:path()) -> #fuse_response{} | no_return().
  rename_interspace(CTX, SourceEntry, TargetPath) ->
      {ok, SourcePath} = file_meta:gen_path(SourceEntry),
      {ok, SourceParent} = file_meta:get_parent(SourceEntry),
      CanonicalTargetPath = get_canonical_path(CTX, TargetPath),
      {_, TargetParentPath} = fslogic_path:basename_and_parent(CanonicalTargetPath),
      SourceSpaceUUID = get_space_uuid(CTX, SourceEntry),
      TargetSpaceUUID = get_space_uuid(CTX, {path, TargetParentPath}),
  
negative.code: %%--------------------------------------------------------------------
  -spec rename_interprovider(fslogic_worker:ctx(), fslogic_worker:file(),
      file_meta:path()) -> #fuse_response{} | no_return().
  rename_interprovider(#fslogic_ctx{session_id = SessId}, SourceEntry, LogicalTargetPath) ->
      {ok, SourcePath} = file_meta:gen_path(SourceEntry),
      {ok, SourceParent} = file_meta:get_parent(SourceEntry),
      SourcePathTokens = filename:split(SourcePath),
      TargetPathTokens = filename:split(LogicalTargetPath),
  
      for_each_child_file(SourceEntry,
          fun(Entry) ->
  