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({