mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Windows File Path Fixes (#39)
* Added system_safe_path to convert paths to Windows * Fix issue where engines would not be reported unless a system engine was installed * Platform independent searching for binaries in engine directory * Add missing package to requirements.txt * Better error handling for ffmpeg.get_all_formats() * Add system_safe_path to more locations in api_server.py * Fix naming issue with Blender on macos * Fix path lookups and add engine_path to workers * Report installed renderers in status * Remove files included by accident
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
|
||||
@@ -103,3 +104,9 @@ def get_file_size_human(file_path):
|
||||
else:
|
||||
return f"{size_in_bytes / 1024 ** 4:.2f} TB"
|
||||
|
||||
|
||||
# Convert path to the appropriate format for the current platform
|
||||
def system_safe_path(path):
|
||||
if platform.system().lower() == "windows":
|
||||
return os.path.normpath(path)
|
||||
return path.replace("\\", "/")
|
||||
|
||||
Reference in New Issue
Block a user