fix: backend data/ dans %APPDATA%\ObsiGate au lieu de Program Files
CI / lint (push) Successful in 25s
CI / security (push) Successful in 13s
CI / test (push) Successful in 28s
CI / build (push) Successful in 6s
CI / e2e (push) Failing after 25s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
CI / lint (push) Successful in 25s
CI / security (push) Successful in 13s
CI / test (push) Successful in 28s
CI / build (push) Successful in 6s
CI / e2e (push) Failing after 25s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
- spawn_backend: current_dir → app_data_dir() (writable sur Windows) - PYTHONPATH = exe_dir pour que 'import backend' trouve le package - Création de data/ dans app_data_dir avant le spawn Corrige PermissionError [WinError 5] Access is denied: 'data'
This commit is contained in:
+6
-1
@@ -119,8 +119,13 @@ fn spawn_backend(exe_dir: &PathBuf) -> Result<Child, String> {
|
||||
|
||||
info!("Starting backend: {}", python.display());
|
||||
|
||||
// Use app data dir as CWD so 'data/' writes go to a writable location (%APPDATA%\ObsiGate)
|
||||
let data_dir = app_data_dir();
|
||||
let _ = fs::create_dir_all(data_dir.join("data"));
|
||||
|
||||
let child = Command::new(&python)
|
||||
.current_dir(exe_dir)
|
||||
.current_dir(&data_dir)
|
||||
.env("PYTHONPATH", exe_dir)
|
||||
.args([
|
||||
"-m", "uvicorn",
|
||||
"backend.main:app",
|
||||
|
||||
Reference in New Issue
Block a user