From dff126cf4005f295747cbd25af81e01a7ff7880e Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Sun, 17 Dec 2023 11:26:23 +0100 Subject: live: ensure image file exists after partclone check that there is a file and that is accessible --- src/live/ogOperations.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/live') diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 0d29948..70c4d38 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -478,6 +478,10 @@ class OgLiveOperations: ogExtendFs(disk, partition) + if os.access(f'{image_path}', os.R_OK) == False: + logging.error(f'Cannot access partclone image file {image_path}') + raise ValueError('Cannot access image file') + image_info = ogGetImageInfo(image_path) except: self._restartBrowser(self._url) -- cgit v1.2.3-18-g5258