@@ -329,9 +329,15 @@ async def make_store(
329329 return await LocalStore .open (root = store_like , mode = mode , read_only = _read_only )
330330
331331 elif isinstance (store_like , str ):
332- # Check for memory:// URLs first (in-process registry lookup)
332+ # Check for memory:// URLs first
333333 if store_like .startswith ("memory://" ):
334- return ManagedMemoryStore .from_url (store_like , read_only = _read_only )
334+ # Parse the URL to extract name and path
335+ url_without_scheme = store_like [len ("memory://" ) :]
336+ parts = url_without_scheme .split ("/" , 1 )
337+ name = parts [0 ] if parts [0 ] else None
338+ path = parts [1 ] if len (parts ) > 1 else ""
339+ # Create or get the store - ManagedMemoryStore handles both cases
340+ return ManagedMemoryStore (name = name , path = path , read_only = _read_only )
335341 # Either an FSSpec URI or a local filesystem path
336342 elif _is_fsspec_uri (store_like ):
337343 return FsspecStore .from_url (
@@ -411,9 +417,14 @@ async def make_store_path(
411417
412418 elif isinstance (store_like , str ) and store_like .startswith ("memory://" ):
413419 # Handle memory:// URLs specially
414- # The store itself now handles the path from the URL
420+ # Parse the URL to extract name and path
415421 _read_only = mode == "r"
416- memory_store = ManagedMemoryStore .from_url (store_like , read_only = _read_only )
422+ url_without_scheme = store_like [len ("memory://" ) :]
423+ parts = url_without_scheme .split ("/" , 1 )
424+ name = parts [0 ] if parts [0 ] else None
425+ url_path = parts [1 ] if len (parts ) > 1 else ""
426+ # Create or get the store - ManagedMemoryStore handles both cases
427+ memory_store = ManagedMemoryStore (name = name , path = url_path , read_only = _read_only )
417428 return await StorePath .open (memory_store , path = path_normalized , mode = mode )
418429
419430 else :
0 commit comments