mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Enable shadow warnings and fix raised errors
This commit is contained in:
		
							parent
							
								
									fd4a06c515
								
							
						
					
					
						commit
						71ee65dc57
					
				
					 27 changed files with 779 additions and 761 deletions
				
			
		|  | @ -301,11 +301,11 @@ bool FileAccessUnix::file_exists(const String &p_path) { | |||
| 
 | ||||
| uint64_t FileAccessUnix::_get_modified_time(const String &p_file) { | ||||
| 	String file = fix_path(p_file); | ||||
| 	struct stat flags = {}; | ||||
| 	int err = stat(file.utf8().get_data(), &flags); | ||||
| 	struct stat status = {}; | ||||
| 	int err = stat(file.utf8().get_data(), &status); | ||||
| 
 | ||||
| 	if (!err) { | ||||
| 		return flags.st_mtime; | ||||
| 		return status.st_mtime; | ||||
| 	} else { | ||||
| 		print_verbose("Failed to get modified time for: " + p_file + ""); | ||||
| 		return 0; | ||||
|  | @ -314,11 +314,11 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) { | |||
| 
 | ||||
| uint32_t FileAccessUnix::_get_unix_permissions(const String &p_file) { | ||||
| 	String file = fix_path(p_file); | ||||
| 	struct stat flags = {}; | ||||
| 	int err = stat(file.utf8().get_data(), &flags); | ||||
| 	struct stat status = {}; | ||||
| 	int err = stat(file.utf8().get_data(), &status); | ||||
| 
 | ||||
| 	if (!err) { | ||||
| 		return flags.st_mode & 0x7FF; //only permissions
 | ||||
| 		return status.st_mode & 0x7FF; //only permissions
 | ||||
| 	} else { | ||||
| 		ERR_FAIL_V_MSG(0, "Failed to get unix permissions for: " + p_file + "."); | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ninni Pipping
						Ninni Pipping