mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-13 05:07:38 +02:00
layerwriter: Fix mistaken hardcoded layer name.
This commit is contained in:
@@ -71,14 +71,14 @@ class LayerWriter(plugins.PluginInterface):
|
||||
return filedata
|
||||
|
||||
def _generator(self):
|
||||
if 'primary' not in self.context.layers:
|
||||
if self.config['primary'] not in self.context.layers:
|
||||
yield 0, ('Layer Name does not exist', )
|
||||
elif os.path.exists(self.config.get('output', self.default_output_name)):
|
||||
yield 0, ('Refusing to overwrite existing output file', )
|
||||
else:
|
||||
output_name = self.config.get('output', self.default_output_name)
|
||||
try:
|
||||
filedata = self.write_layer(self.context, 'primary', output_name,
|
||||
filedata = self.write_layer(self.context, self.config['primary'], output_name,
|
||||
self.config.get('block_size', self.default_block_size),
|
||||
self._progress_callback)
|
||||
self.produce_file(filedata)
|
||||
|
||||
Reference in New Issue
Block a user