mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-07 03:35:35 +00:00
17 lines
318 B
Python
17 lines
318 B
Python
import platform
|
|
|
|
|
|
# TODO: Check is_windows on app start in settings.py
|
|
def is_windows():
|
|
"""
|
|
Returns True if the OS is Windows.
|
|
"""
|
|
return platform.system() == "Windows"
|
|
|
|
|
|
def win_replace_slash(path: str):
|
|
if is_windows():
|
|
return path.replace("\\", "/").replace("//", "/")
|
|
|
|
return path
|