mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Fix listing files inside directory in pack file
When adding a directory path to the inventory of the pack, an empty file name was being added to the file list. That made `Directory.get_ntext()` signal end-of-list too early so that files in a subdirectory were missed. Fixes #15801. Helps with #16798.
This commit is contained in:
		
							parent
							
								
									201d2d7226
								
							
						
					
					
						commit
						536611704a
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -88,7 +88,11 @@ void PackedData::add_path(const String &pkg_path, const String &path, uint64_t o | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		cd->files.insert(path.get_file()); | 		String filename = path.get_file(); | ||||||
|  | 		// Don't add as a file if the path points to a directoryy
 | ||||||
|  | 		if (!filename.empty()) { | ||||||
|  | 			cd->files.insert(filename); | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pedro J. Estébanez
						Pedro J. Estébanez