anchor.diff:      gri = #gri{id = BaseDirGuid, aspect = file_at_path},
       data = Data
   }) ->
  -    PathInfo = maps:get(path, Data, []),
  -
  -    CreateDirs = case Operation of
  -        create -> maps:get(<<"create_parents">>, Data, ?DEFAULT_CREATE_PARENTS_FLAG);
  -        _ -> false
  -    end,
  -
  -    FilePath = case Operation of
  -        create -> str_utils:join_as_binaries(lists:droplast(PathInfo), <<"/">>);
  -        _ -> str_utils:join_as_binaries(PathInfo, <<"/">>)
  -    end,
  -
  -    Mode = maps:get(<<"mode">>, Data, ?DEFAULT_DIR_MODE),
  -
  -    case lfm:resolve_guid_by_relative_path(SessionId, BaseDirGuid, FilePath, CreateDirs, Mode) of
  -        {ok, ResolvedGuid} -> ResolvedGuid;
  -        {error, Errno} -> throw(?ERROR_POSIX(Errno))
  +    case maps:get(path, Data, []) of
  +        [] ->
  +            BaseDirGuid;
  +        PathInfo ->
  +            CreateDirs = case Operation of
  +                create -> maps:get(<<"create_parents">>, Data, ?DEFAULT_CREATE_PARENTS_FLAG);
  +                _ -> false
  +            end,
  +
  +            FilePath = case Operation of
  +                create -> filename:join(lists:droplast(PathInfo));
  +                _ -> filename:join(PathInfo)
  +            end,
  +
  +            Mode = maps:get(<<"mode">>, Data, ?DEFAULT_DIR_MODE),
  +
  +            case lfm:resolve_guid_by_relative_path(SessionId, BaseDirGuid, FilePath, CreateDirs, Mode) of
  +                {ok, ResolvedGuid} -> ResolvedGuid;
  +                {error, Errno} -> throw(?ERROR_POSIX(Errno))
  +            end
       end;
   resolve_target_file(#op_req{gri = #gri{id = TargetFileGuid}}) ->
       TargetFileGuid.
positive.code: 
      Name = case Aspect of
          child -> maps:get(<<"name">>, Params);
          file_at_path -> lists:last(cowboy_req:path_info(Req))
      end,
  
      Mode = maps:get(<<"mode">>, Params, undefined),
  
negative.code:             {
                  RawParams#{path => cowboy_req:path_info(Req)},
                  #{<<"create_parents">> => {boolean, any}},
                  #{path => {list_of_binaries, fun
                      ([]) ->
                          throw(?ERROR_MISSING_REQUIRED_VALUE(<<"path">>));
                      (PathTokens) ->
                          assert_valid_file_path(PathTokens),
                          {true, PathTokens}
                  end
                  }}
              }
  