anchor.diff:  -spec maybe_update_file_location(storage_file_ctx:ctx(), #file_attr{}, file_ctx:ctx(), info()) ->
       {Updated :: boolean(), file_ctx:ctx(), storage_file_ctx:ctx(), file_attr_name()}.
   maybe_update_file_location(StorageFileCtx, _FileAttr, FileCtx, _Info) ->
  -    {#statbuf{st_mode = StMode}, StorageFileCtx2} = storage_file_ctx:stat(StorageFileCtx),
  -    case file_meta:type(StMode) of
  -        ?DIRECTORY_TYPE ->
  -            {false, FileCtx, StorageFileCtx2, ?FILE_LOCATION_ATTR_NAME};
  -        ?REGULAR_FILE_TYPE ->
  -            maybe_update_file_location(StorageFileCtx2, FileCtx)
  +    case file_ctx:is_dir(FileCtx) of
  +        {true, FileCtx2} ->
  +            {false, FileCtx2, StorageFileCtx, ?FILE_LOCATION_ATTR_NAME};
  +        {false, FileCtx2} ->
  +            maybe_update_file_location(StorageFileCtx, FileCtx2)
       end.
   
   %%--------------------------------------------------------------------
  
positive.code:             % there was race with creating file by lfm
              % file will be imported with suffix
              FileName2 = ?IMPORTED_CONFLICTING_FILE_NAME(FileName),
              FileMetaDoc2 = file_meta:new_doc(FileUuid, FileName2, file_meta:type(Mode),
                  Mode band 8#1777, OwnerId, ParentUuid, SpaceId),
              {ok, FileUuid} = file_meta:create({uuid, ParentUuid}, FileMetaDoc2),
              {ok, FileMetaDoc2};
          {ok, FileUuid} ->
  
negative.code:             create_dir_location(FileUuid, StorageFileCtx2)
      end.
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% This function shall be called only on non-posix storage where there
  %% is no GID in file's attrs on storage.
  %% @end
  %%--------------------------------------------------------------------
  -spec create_dir_location(file_meta:uuid()) -> ok.
  create_dir_location(FileUuid) ->
      ok = dir_location:mark_dir_synced_from_storage(FileUuid, undefined).
  
  -spec create_dir_location(file_meta:uuid(), storage_file_ctx:ctx()) -> {ok, storage_file_ctx:ctx()}.
  create_dir_location(FileUuid, StorageFileCtx) ->
  