mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
添加 otg 文件夹创建判断,避免文件夹存在导致程序退出
This commit is contained in:
parent
a59fe84e26
commit
7116da2511
@ -48,7 +48,8 @@ from .hid.mouse import make_mouse_hid
|
||||
# =====
|
||||
def _mkdir(path: str) -> None:
|
||||
get_logger().info("MKDIR --- %s", path)
|
||||
os.mkdir(path)
|
||||
if not os.path.isdir(path):
|
||||
os.makedirs(path, exist_ok=True)
|
||||
|
||||
|
||||
def _chown(path: str, user: str, optional: bool=False) -> None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user