anchor.diff:  %%% Internal functions
   %%%===================================================================
   
  --spec ensure_not_share_file_ctx(file_ctx:ctx()) -> file_ctx:ctx().
  -ensure_not_share_file_ctx(FileCtx) ->
  +-spec share_to_standard_file_ctx(file_ctx:ctx()) -> file_ctx:ctx().
  +share_to_standard_file_ctx(FileCtx) ->
       Guid = file_ctx:get_guid_const(FileCtx),
       case file_id:is_share_guid(Guid) of
           true ->
  -            {Uuid, SpaceId, _} = file_id:unpack_share_guid(Guid),
  -            Guid2 = file_id:pack_guid(Uuid, SpaceId),
  +            Guid2 = file_id:share_guid_to_guid(Guid),
               file_ctx:new_by_guid(Guid2);
           false ->
               FileCtx
  
positive.code: -spec rmdir(file_ctx:ctx(), user_ctx:ctx()) ->
      {ok, file_ctx:ctx()} | {error, term()}.
  rmdir(DirCtx, UserCtx) ->
      DirCtx2 = ensure_not_share_file_ctx(DirCtx),
      SessId = user_ctx:get_session_id(UserCtx),
      FileUuid = file_ctx:get_uuid_const(DirCtx2),
      case storage_driver:new_handle(SessId, DirCtx2, false) of
  
negative.code:     case TargetParentCtx =/= undefined of
          true ->
              TargetParentCtx2 = file_ctx:assert_not_readonly_storage(TargetParentCtx),
              TargetParentCtx3 = share_to_standard_file_ctx(TargetParentCtx2),
              % we know target parent uuid, so we can create parent directories with correct mode
              % ensure all target parent directories are created
              {ok, _} = mkdir_deferred(TargetParentCtx3, UserCtx);
  