anchor.diff:              FileSnapshots = [File],
               lists:foreach(
                   fun(Snapshot) ->
  +                    maybe_sync_file(SessId, Snapshot, SourceSpaceId, TargetSpaceId),
                       ok = file_meta:rename(Snapshot, {path, NewPath}),
                       ok = rename_on_storage(Ctx, TargetSpaceId, Snapshot)
                   end, FileSnapshots),
  
positive.code:                         FileSnapshots = [File],
                          lists:foreach(
                              fun(Snapshot) ->
                                  ok = rename_on_storage(Ctx, TargetSpaceId, Snapshot)
                              end, FileSnapshots),
                          {Acc, undefined};
  
negative.code:                         OldSpaceId, NewGuid)
                  end, Entries)
      end.
  
  %%--------------------------------------------------------------------
  %% @doc Requests file replication to current provider if
  %% NewSpaceId is different than OldSpaceId
  %%--------------------------------------------------------------------
  -spec maybe_sync_file(SessId :: session:id(), Entry :: file_meta:entry(),
      OldSpaceId :: binary(), NewSpaceId :: binary()) ->
      ok.
  maybe_sync_file(SessId, Entry, OldSpaceId, NewSpaceId) ->
      case OldSpaceId =:= NewSpaceId of
          false ->
              {ok, Uuid} = file_meta:to_uuid(Entry),
              logical_file_manager:replicate_file(
                  SessId,
                  {guid, fslogic_uuid:uuid_to_guid(Uuid, OldSpaceId)},
                  oneprovider:get_provider_id()
              );
          true ->
              ok
      end.
  