forked from eden-emu/eden
		
	FileSys: Append the requested path to the filesystem base path in DeleteFile.
We were trying to delete things in the current directory instead of the actual filesystem directory. This may fix some savedata issues in some games.
This commit is contained in:
		
							parent
							
								
									81739a5448
								
							
						
					
					
						commit
						7e5e4f8d7a
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -58,11 +58,13 @@ ResultVal<std::unique_ptr<StorageBackend>> Disk_FileSystem::OpenFile(const std:: | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ResultCode Disk_FileSystem::DeleteFile(const std::string& path) const { | ResultCode Disk_FileSystem::DeleteFile(const std::string& path) const { | ||||||
|     if (!FileUtil::Exists(path)) { |     std::string full_path = base_directory + path; | ||||||
|  | 
 | ||||||
|  |     if (!FileUtil::Exists(full_path)) { | ||||||
|         return ERROR_PATH_NOT_FOUND; |         return ERROR_PATH_NOT_FOUND; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     FileUtil::Delete(path); |     FileUtil::Delete(full_path); | ||||||
| 
 | 
 | ||||||
|     return RESULT_SUCCESS; |     return RESULT_SUCCESS; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Subv
						Subv