mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Merge pull request #1297 from Subv/saves
DiskDirectory: Initialize the directory member with valid info.
This commit is contained in:
		
						commit
						cddb9bd2aa
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		|  | @ -139,7 +139,7 @@ bool DiskFile::Close() const { | |||
| 
 | ||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| DiskDirectory::DiskDirectory(const DiskArchive& archive, const Path& path) { | ||||
| DiskDirectory::DiskDirectory(const DiskArchive& archive, const Path& path) : directory() { | ||||
|     // TODO(Link Mauve): normalize path into an absolute path without "..", it can currently bypass
 | ||||
|     // the root directory we set while opening the archive.
 | ||||
|     // For example, opening /../../usr/bin can give the emulated program your installed programs.
 | ||||
|  | @ -149,7 +149,9 @@ DiskDirectory::DiskDirectory(const DiskArchive& archive, const Path& path) { | |||
| bool DiskDirectory::Open() { | ||||
|     if (!FileUtil::IsDirectory(path)) | ||||
|         return false; | ||||
|     FileUtil::ScanDirectoryTree(path, directory); | ||||
|     unsigned size = FileUtil::ScanDirectoryTree(path, directory); | ||||
|     directory.size = size; | ||||
|     directory.isDirectory = true; | ||||
|     children_iterator = directory.children.begin(); | ||||
|     return true; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue