fp-webui 0.1.1.dev0__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/PKG-INFO +1 -1
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/README.md +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/pyproject.toml +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/setup.cfg +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui/__init__.py +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui/main.py +5 -2
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui/static/.gitkeep +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui/static/background.svg +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui/static/index.html +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui.egg-info/PKG-INFO +1 -1
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui.egg-info/SOURCES.txt +0 -1
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui.egg-info/dependency_links.txt +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui.egg-info/entry_points.txt +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui.egg-info/requires.txt +0 -0
- {fp_webui-0.1.1.dev0 → fp_webui-0.1.3}/src/fp_webui.egg-info/top_level.txt +0 -0
- fp_webui-0.1.1.dev0/src/fp_webui/static/favicon.png +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -29,6 +29,8 @@ import sys
|
|
|
29
29
|
import time
|
|
30
30
|
from contextlib import asynccontextmanager, suppress
|
|
31
31
|
|
|
32
|
+
from fp_core.platform_utils import get_data_dir
|
|
33
|
+
|
|
32
34
|
# ── FastAPI / WebSocket ─────────────────────────────────
|
|
33
35
|
try:
|
|
34
36
|
import uvicorn
|
|
@@ -107,8 +109,7 @@ event_bus = EventBus()
|
|
|
107
109
|
# ════════════════════════════════════════════════════════════
|
|
108
110
|
|
|
109
111
|
_TOKEN_DIR: str = os.path.join(
|
|
110
|
-
|
|
111
|
-
"fp",
|
|
112
|
+
get_data_dir(),
|
|
112
113
|
)
|
|
113
114
|
_TOKENS_DIR: str = os.path.join(_TOKEN_DIR, "tokens")
|
|
114
115
|
os.makedirs(_TOKENS_DIR, exist_ok=True)
|
|
@@ -134,6 +135,8 @@ def _load_or_create_token() -> str:
|
|
|
134
135
|
with open(_TOKEN_FILE, "w") as f:
|
|
135
136
|
f.write(new_token)
|
|
136
137
|
os.chmod(_TOKEN_FILE, 0o600)
|
|
138
|
+
except PermissionError:
|
|
139
|
+
pass # Windows 不支持 chmod,静默跳过
|
|
137
140
|
except OSError:
|
|
138
141
|
pass
|
|
139
142
|
return new_token
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|