From 2d6c9397c0d6e5e6beb669693044f2086c2fe461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tr=C3=A1vn=C3=ADk?= Date: Sat, 3 Jan 2026 12:47:03 +0100 Subject: [PATCH] fix: handle imported repositories correctly in getEffectiveLocalPath - Imported repositories use config.path directly (matching server logic) - Removed unused isImportedLocal variable --- .../repository-forms/local-repository-form.tsx | 4 ++-- app/client/modules/repositories/tabs/info.tsx | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx b/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx index 5a31755c..ecc1122b 100644 --- a/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx +++ b/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx @@ -54,8 +54,8 @@ export const LocalRepositoryForm = ({ form }: Props) => { If the path is not a host mount, you will lose your repository data when the container restarts.

- The default path {REPOSITORY_BASE} is - safe to use if you followed the recommended Docker Compose setup. + The default path {REPOSITORY_BASE} is safe to use if you + followed the recommended Docker Compose setup.

diff --git a/app/client/modules/repositories/tabs/info.tsx b/app/client/modules/repositories/tabs/info.tsx index 25308f82..fea1e191 100644 --- a/app/client/modules/repositories/tabs/info.tsx +++ b/app/client/modules/repositories/tabs/info.tsx @@ -28,7 +28,14 @@ type Props = { const getEffectiveLocalPath = (repository: Repository): string | null => { if (repository.type !== "local") return null; - const config = repository.config as { name: string; path?: string }; + const config = repository.config as { name: string; path?: string; isExistingRepository?: boolean }; + + if (config.isExistingRepository) { + // Imported repositories use the path directly + return config.path ?? null; + } + + // New repositories append the name to the base path const basePath = config.path || REPOSITORY_BASE; return `${basePath}/${config.name}`; }; @@ -40,7 +47,6 @@ export const RepositoryInfoTabContent = ({ repository }: Props) => { ); const [showConfirmDialog, setShowConfirmDialog] = useState(false); - const isImportedLocal = repository.type === "local" && repository.config.isExistingRepository; const effectiveLocalPath = getEffectiveLocalPath(repository); const updateMutation = useMutation({