state: don't consider missing state file to be a fatal error
This commit is contained in:
		
							parent
							
								
									464c078bbe
								
							
						
					
					
						commit
						713d5071d5
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -45,8 +45,9 @@ lif_state_read_path(struct lif_dict *state, const char *path)
 | 
			
		|||
	FILE *fd = fopen(path, "r");
 | 
			
		||||
	bool ret;
 | 
			
		||||
 | 
			
		||||
	/* if file cannot be opened, assume an empty state */
 | 
			
		||||
	if (fd == NULL)
 | 
			
		||||
		return false;
 | 
			
		||||
		return true;
 | 
			
		||||
 | 
			
		||||
	ret = lif_state_read(state, fd);
 | 
			
		||||
	fclose(fd);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue