Skip to content

Commit 5c256fe

Browse files
committed
revert
1 parent 0cd1f89 commit 5c256fe

4 files changed

Lines changed: 5 additions & 187 deletions

File tree

ratarmount/FuseMount.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from .cli import create_parser
3030
from .fuse import fuse
3131
from .WriteOverlay import WritableFolderMountSource
32-
from .MemoryMountSource import MemoryMountSource
3332

3433
logger = 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

ratarmount/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,7 @@ def create_parser(useColor: Optional[bool] = True) -> argparse.ArgumentParser:
252252
'to that writable copy. Deleting files or folders will update the hidden metadata database inside '
253253
'the overlay folder. '
254254
'If ":temp:" is specified, a temporary directory will be created and used as the overlay. '
255-
'This temporary directory will be automatically removed after unmounting. '
256-
'If ":memory:" is specified, an in-memory overlay will be used. '
257-
'This overlay will not persist after unmounting.')
255+
'This temporary directory will be automatically removed after unmounting.')
258256

259257
# Index Options
260258

test_memory_overlay.py

Lines changed: 0 additions & 170 deletions
This file was deleted.

tests/ratarmount-help.txt

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)