Skip to content

[BUG] Can't open submodules as projects #5099

@jorge-menjivar

Description

@jorge-menjivar

Version

0.13.0

Operating System

Linux

Distribution Method

AppImage (Linux)

Describe the issue

I want to open and work in a submodule in my repo, but I get "Not a directory (os error 20)" when trying to open a submodule as a project. Opening the main project does not cause this issue.

How to reproduce

Using the cosmic-epoch repo as an example

  1. Clone https://github.com/pop-os/cosmic-epoch.
  2. Init the submodules with git submodule update --init --recursive
  3. Open any of the submodules inside the cosmic-epoch project as a submodule. It will throw the error.

Expected behavior

It should be able to open it (i.e. deal with .git files)

Relevant log output

2024-10-11T04:45:57.632111Z ERROR get_project: crates/gitbutler-project/src/controller.rs:161: failed to create "/home/jorge/rust_projects/cosmic-epoch/cosmic-applibrary/.git/gitbutler" on project get project_id=5bcdae24-6a01-4275-90d7-b9b5671a4a42 error=Os { code: 20, kind: NotADirectory, message: "Not a directory" } id=5bcdae24-6a01-4275-90d7-b9b5671a4a42 no_validation=None
2024-10-11T04:45:57.632145Z  INFO get_project: crates/gitbutler-tauri/src/projects.rs:32: close time.busy=804µs time.idle=47.3µs id=5bcdae24-6a01-4275-90d7-b9b5671a4a42 no_validation=None
2024-10-11T04:45:57.633198Z ERROR set_project_active: crates/gitbutler-project/src/controller.rs:161: failed to create "/home/jorge/rust_projects/cosmic-epoch/cosmic-applibrary/.git/gitbutler" on project get project_id=5bcdae24-6a01-4275-90d7-b9b5671a4a42 error=Os { code: 20, kind: NotADirectory, message: "Not a directory" } id=5bcdae24-6a01-4275-90d7-b9b5671a4a42
2024-10-11T04:45:57.633231Z ERROR set_project_active:set_project_to_window: crates/gitbutler-tauri/src/window.rs:129: error=Not a directory (os error 20) id=5bcdae24-6a01-4275-90d7-b9b5671a4a42 window="main"
2024-10-11T04:45:57.633242Z  INFO set_project_active:set_project_to_window: crates/gitbutler-tauri/src/window.rs:129: close time.busy=19.7µs time.idle=6.48µs id=5bcdae24-6a01-4275-90d7-b9b5671a4a42 window="main"
2024-10-11T04:45:57.633252Z ERROR set_project_active: crates/gitbutler-tauri/src/projects.rs:67: error=Error(Not a directory (os error 20)) id=5bcdae24-6a01-4275-90d7-b9b5671a4a42
2024-10-11T04:45:57.633261Z  INFO set_project_active: crates/gitbutler-tauri/src/projects.rs:67: close time.busy=318µs time.idle=9.24µs id=5bcdae24-6a01-4275-90d7-b9b5671a4a42

Metadata

Metadata

Assignees

Labels

enhancementAn improvement to an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions