fix(project): don't abort early on project restore_state
And add traces for project write_state/restore_state.
This commit is contained in:
		
							parent
							
								
									7ecdc38fdf
								
							
						
					
					
						commit
						a1df51a16c
					
				
					 2 changed files with 26 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -607,6 +607,7 @@ const Process = struct {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    fn persist_project(self: *Process, project: *Project) !void {
 | 
			
		||||
        tp.trace(tp.channel.event, .{ "persist_project", project.name });
 | 
			
		||||
        self.logger.print("saving: {s}", .{project.name});
 | 
			
		||||
        const file_name = try get_project_state_file_path(self.allocator, project);
 | 
			
		||||
        defer self.allocator.free(file_name);
 | 
			
		||||
| 
						 | 
				
			
			@ -618,6 +619,7 @@ const Process = struct {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    fn restore_project(self: *Process, project: *Project) !void {
 | 
			
		||||
        tp.trace(tp.channel.event, .{ "restore_project", project.name });
 | 
			
		||||
        const file_name = try get_project_state_file_path(self.allocator, project);
 | 
			
		||||
        defer self.allocator.free(file_name);
 | 
			
		||||
        var file = std.fs.openFileAbsolute(file_name, .{ .mode = .read_only }) catch |e| switch (e) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue