Skip to content

Commit 9c9af61

Browse files
authored
Merge pull request #12086 from gitbutlerapp/fix2
Use `ctx` to access specific paths, don't hardcode it.
2 parents 35043dd + db197b0 commit 9c9af61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/gitbutler-oplog/src/oplog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ pub fn prepare_snapshot(
448448
// It may be the case that with the refactoring through `but-meta` the head value is no longer in sync so sync_heads_with_references is the final attempt to sync it
449449
// This is relevant only for snapshot restore.
450450
// Create a blob out of `.git/gitbutler/virtual_branches.toml`
451-
let vb_path = repo.path().join("gitbutler").join("virtual_branches.toml");
451+
let vb_path = ctx.project_data_dir().join("virtual_branches.toml");
452452
let vb_content = fs::read(vb_path)?;
453453
let vb_blob_id = repo.blob(&vb_content)?;
454454
tree_builder.insert("virtual_branches.toml", vb_blob_id, FileMode::Blob.into())?;

0 commit comments

Comments
 (0)