Linux路径

This commit is contained in:
龙澳 2025-01-13 11:07:14 +08:00
parent 3e2f9b7f85
commit bcf182c08a

View File

@ -115,7 +115,7 @@ class ImagePreprocessor:
output_drive = os.path.splitdrive( output_drive = os.path.splitdrive(
os.path.abspath(self.config.output_dir))[0] os.path.abspath(self.config.output_dir))[0]
if not output_drive: # 处理Linux/Unix路径 if not output_drive: # 处理Linux/Unix路径
output_drive = '/' output_drive = '/home'
disk_usage = psutil.disk_usage(output_drive) disk_usage = psutil.disk_usage(output_drive)
free_space = disk_usage.free free_space = disk_usage.free