FileSystem: Check PHYSFS_registerArchiver() for success
This commit is contained in:
		
							parent
							
								
									98bdfcf758
								
							
						
					
					
						commit
						86194118a3
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		| 
						 | 
					@ -325,13 +325,18 @@ FileSystem::FileSystem(const char *argv0,
 | 
				
			||||||
	if (PHYSFS_init(argv0) == 0)
 | 
						if (PHYSFS_init(argv0) == 0)
 | 
				
			||||||
		throwPhysfsError("Error initializing PhysFS");
 | 
							throwPhysfsError("Error initializing PhysFS");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* One error (=return 0) turns the whole product to 0 */
 | 
				
			||||||
 | 
						int er = 1;
 | 
				
			||||||
 | 
						er *= PHYSFS_registerArchiver(&RGSS1_Archiver);
 | 
				
			||||||
 | 
						er *= PHYSFS_registerArchiver(&RGSS2_Archiver);
 | 
				
			||||||
 | 
						er *= PHYSFS_registerArchiver(&RGSS3_Archiver);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (er == 0)
 | 
				
			||||||
 | 
							throwPhysfsError("Error registering PhysFS RGSS archiver");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p = new FileSystemPrivate;
 | 
						p = new FileSystemPrivate;
 | 
				
			||||||
	p->havePathCache = false;
 | 
						p->havePathCache = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	PHYSFS_registerArchiver(&RGSS1_Archiver);
 | 
					 | 
				
			||||||
	PHYSFS_registerArchiver(&RGSS2_Archiver);
 | 
					 | 
				
			||||||
	PHYSFS_registerArchiver(&RGSS3_Archiver);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (allowSymlinks)
 | 
						if (allowSymlinks)
 | 
				
			||||||
		PHYSFS_permitSymbolicLinks(1);
 | 
							PHYSFS_permitSymbolicLinks(1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue