Merge pull request 'fix-ogReduceFs' (#23) from fix-ogReduceFs into main
ogclone-engine/pipeline/tag This commit looks good
Details
ogclone-engine/pipeline/tag This commit looks good
Details
Reviewed-on: #23pull/24/head 0.3.6
commit
e1a1be667b
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.3.6] - 2025-04-09
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed ogReduceFs
|
||||||
|
|
||||||
## [0.3.5] - 2025-04-09
|
## [0.3.5] - 2025-04-09
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -692,7 +692,8 @@ def ogReduceFs (disk, par):
|
||||||
break
|
break
|
||||||
elif type == 'NTFS':
|
elif type == 'NTFS':
|
||||||
ogUnmount (disk, par)
|
ogUnmount (disk, par)
|
||||||
nr_lines = subprocess.run (['ntfsresize', '-fi', PART], capture_output=True, text=True).stdout.splitlines()
|
ntfsresize_out = subprocess.run (['ntfsresize', '-fi', PART], capture_output=True, text=True).stdout
|
||||||
|
nr_lines = ntfsresize_out.splitlines()
|
||||||
maxsize = None
|
maxsize = None
|
||||||
size = None
|
size = None
|
||||||
for l in nr_lines:
|
for l in nr_lines:
|
||||||
|
@ -702,12 +703,10 @@ def ogReduceFs (disk, par):
|
||||||
size = l.split()[4]
|
size = l.split()[4]
|
||||||
size = int ((int (size) * 1.1 / 1024 + 1) * 1024)
|
size = int ((int (size) * 1.1 / 1024 + 1) * 1024)
|
||||||
|
|
||||||
if not maxsize and not size:
|
if not maxsize or not size:
|
||||||
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_PARTITION, f'{disk},{par}')
|
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_PARTITION, f'{disk},{par} ({ntfsresize_out})')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
import time
|
|
||||||
|
|
||||||
extrasize = 0
|
extrasize = 0
|
||||||
retval = 1
|
retval = 1
|
||||||
while retval != 0 and size+extrasize < maxsize:
|
while retval != 0 and size+extrasize < maxsize:
|
||||||
|
|
Loading…
Reference in New Issue