mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:02:45 +00:00 
			
		
		
		
	AK: Remove the LexicalPath::is_valid() API
Since this is always set to true on the non-default constructor and subsequently never modified, it is somewhat pointless. Furthermore, there are arguably no invalid relative paths.
This commit is contained in:
		
							parent
							
								
									caa9daf59e
								
							
						
					
					
						commit
						9b8f35259c
					
				
					 10 changed files with 14 additions and 66 deletions
				
			
		|  | @ -182,18 +182,10 @@ Optional<String> NewProjectDialog::get_project_full_path() | |||
|     auto create_in = m_create_in_input->text(); | ||||
|     auto maybe_project_name = get_available_project_name(); | ||||
| 
 | ||||
|     if (!maybe_project_name.has_value()) { | ||||
|         return {}; | ||||
|     } | ||||
| 
 | ||||
|     auto project_name = maybe_project_name.value(); | ||||
|     auto full_path = LexicalPath(String::formatted("{}/{}", create_in, project_name)); | ||||
| 
 | ||||
|     // Do not permit otherwise invalid paths.
 | ||||
|     if (!full_path.is_valid()) | ||||
|     if (!maybe_project_name.has_value()) | ||||
|         return {}; | ||||
| 
 | ||||
|     return full_path.string(); | ||||
|     return LexicalPath::join(create_in, *maybe_project_name).string(); | ||||
| } | ||||
| 
 | ||||
| void NewProjectDialog::do_create_project() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Max Wipfli
						Max Wipfli