From 0be345eb247d59b6beed8e6dcbd456757b87fc9c Mon Sep 17 00:00:00 2001 From: Accusys Date: Thu, 19 Nov 2026 14:37:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Unregister=20sync=20mode=20=E6=B8=85?= =?UTF-8?q?=E9=99=A4=20per-library=20output=20=E2=80=94=20rust=5Funregiste?= =?UTF-8?q?r=20=E5=8F=AA=E5=88=AA=E5=85=A8=E5=9F=9F=20OUTPUT=5FDIR=20-=20U?= =?UTF-8?q?I=20Unregister=20=E8=B5=B0=20sync=20mode=20=E2=86=92=20rust=5Fu?= =?UTF-8?q?nregister=20binary=20-=20rust=5Funregister=20=E5=8F=AA=E7=94=A8?= =?UTF-8?q?=20config::OUTPUT=5FDIR(demo)=EF=BC=8C=E4=B8=8D=E8=80=83?= =?UTF-8?q?=E6=85=AE=20library=20=E2=86=92=20test=20output=20=E6=AE=98?= =?UTF-8?q?=E7=95=99=20-=20=E4=BF=AE=E5=BE=A9:=20rust=5Funregister=20?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=BE=8C=E8=A3=9C=E5=91=BC=E5=8F=AB=20delete?= =?UTF-8?q?=5Foutput=5Ffiles=20(=E6=8E=83=E6=8F=8F=E5=85=A8=E5=9F=9F+per-l?= =?UTF-8?q?ib+=E6=89=80=E6=9C=89=20upload=5Fpaths)=20-=20=E9=A9=97?= =?UTF-8?q?=E8=AD=89:=20test=20=E7=9B=AE=E9=8C=84=208=20=E5=80=8B=20output?= =?UTF-8?q?=20=E6=AA=94=E6=A1=88=E5=85=A8=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/files.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/api/files.rs b/src/api/files.rs index 0d5430b4..3be685de 100644 --- a/src/api/files.rs +++ b/src/api/files.rs @@ -1463,6 +1463,13 @@ async fn unregister( })?; if output.status.success() { + // rust_unregister only clears the global OUTPUT_DIR (demo). + // Also clear per-library output dirs (test, etc.) which it doesn't know about. + let extra_deleted = delete_output_files(&uuid, state.db.pool(), None).await; + if extra_deleted > 0 { + tracing::info!("[UNREGISTER] Sync mode: additionally deleted {} output files across libraries for {}", extra_deleted, uuid); + } + Ok(Json(UnregisterResponse { success: true, message: "Unregister completed (sync mode)".to_string(),