mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-09-11 12:25:42 +03:00
acquire lock closer to where it is used
This commit is contained in:
parent
01a4c63900
commit
5c99150b20
@ -164,8 +164,6 @@ impl Store {
|
||||
}
|
||||
|
||||
pub fn get(&self) -> Result<Option<sessions::Session>> {
|
||||
let git_repository = self.git_repository.lock().unwrap();
|
||||
|
||||
let session_path = self.project.session_path();
|
||||
let meta_path = session_path.join("meta");
|
||||
if !meta_path.exists() {
|
||||
@ -212,6 +210,7 @@ impl Store {
|
||||
false => None,
|
||||
};
|
||||
|
||||
let git_repository = self.git_repository.lock().unwrap();
|
||||
let activity_path = git_repository.path().join("logs/HEAD");
|
||||
let activity = match activity_path.exists() {
|
||||
true => std::fs::read_to_string(activity_path)
|
||||
|
Loading…
Reference in New Issue
Block a user