2929from .cli import create_parser
3030from .fuse import fuse
3131from .WriteOverlay import WritableFolderMountSource
32- from .MemoryMountSource import MemoryMountSource
3332
3433logger = logging .getLogger (__name__ )
3534
@@ -165,21 +164,16 @@ def __init__(self, pathToMount: Union[str, list[str]], mountPoint: str, **option
165164 options ['writeIndex' ] = True
166165
167166 # Add write overlay as folder mount source to read from with highest priority.
168- memoryOverlay : Optional [MemoryOverlay ] = None
169167 if 'writeOverlay' in options and isinstance (options ['writeOverlay' ], str ) and options ['writeOverlay' ]:
170168 if options ['writeOverlay' ] == ':temp:' :
171169 self ._temporaryOverlayFolder = tempfile .TemporaryDirectory (prefix = "ratarmount-write-overlay." )
172170 self .overlayPath = self ._temporaryOverlayFolder .name
173171 logger .info ("Created temporary overlay directory: %s" , self .overlayPath )
174- pathToMount .append (self .overlayPath )
175- elif options ['writeOverlay' ] == ':memory:' :
176- self .overlayPath = ''
177- memoryOverlay = MemoryOverlay ()
178172 else :
179173 self .overlayPath = os .path .realpath (options ['writeOverlay' ])
180174 if not os .path .exists (self .overlayPath ):
181175 os .makedirs (self .overlayPath , exist_ok = True )
182- pathToMount .append (self .overlayPath )
176+ pathToMount .append (self .overlayPath )
183177
184178 # Take care that bind-mounting folders to itself works
185179 mountSources : list [tuple [str , MountSource ]] = []
@@ -206,9 +200,6 @@ def __init__(self, pathToMount: Union[str, list[str]], mountPoint: str, **option
206200 if options .get ('lazyMounting' , False ):
207201 self ._filter_index_locations_in_fuse_mount (options )
208202
209- if memoryOverlay :
210- mountSources .append (memoryOverlay )
211-
212203 # Open log file.
213204 openLog : Optional [Callable [[int ], IO [bytes ]]] = None
214205 if not logFilePath and self ._enableControlInterface :
@@ -270,13 +261,13 @@ def _get_log(_buffering: int = 0) -> IO[bytes]:
270261 if join_threads is not None :
271262 join_threads ()
272263
273- if self .overlayPath is not None :
264+ if self .overlayPath :
274265 ignoredPrefixes : list [str ] = []
275266 if self ._enableControlInterface :
276267 ignoredPrefixes .append (self ._controlLayerPrefix )
277268 self .writeOverlay = WritableFolderMountSource (
278269 self .overlayPath , self .mountSource , ignoredPrefixes = ignoredPrefixes
279- ) if self . overlayPath else memoryOverlay
270+ )
280271
281272 self .chmod = self .writeOverlay .chmod
282273 self .chown = self .writeOverlay .chown
0 commit comments