Skip to content

Commit

Permalink
update iocage.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Defenso-QTH committed Sep 21, 2024
1 parent 7cd5c0e commit f2e189d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions iocage_lib/iocage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2237,9 +2237,15 @@ def snap_remove(self, snapshot, cloned_datasets=None):
conf = ioc_json.IOCJson(path, silent=self.silent).json_get_value('all')

if ioc_common.check_truthy(conf['template']):
target = f'{self.iocroot}/templates/{uuid}@{snapshot}'
target = os.path.join(
self.zpool.name, self.zpool.prefix, 'iocage',
'templates', f"{uuid}@{snapshot}"
)
else:
target = f'{self.iocroot}/jails/{uuid}@{snapshot}'
target = os.path.join(
self.zpool.name, self.zpool.prefix, 'iocage',
'jails', f"{uuid}@{snapshot}"
)

# Let's verify target exists and then destroy it, else log it
snapshot = Snapshot(target)
Expand Down

0 comments on commit f2e189d

Please sign in to comment.