Trivia
This commit is contained in:
		
							parent
							
								
									d45ad8fcf5
								
							
						
					
					
						commit
						739bab0be7
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -150,7 +150,7 @@ Path dirOf(const Path & path) | ||||||
| string baseNameOf(const Path & path) | string baseNameOf(const Path & path) | ||||||
| { | { | ||||||
|     if (path.empty()) |     if (path.empty()) | ||||||
|         return string(""); |         return ""; | ||||||
| 
 | 
 | ||||||
|     Path::size_type last = path.length() - 1; |     Path::size_type last = path.length() - 1; | ||||||
|     if (path[last] == '/' && last > 0) |     if (path[last] == '/' && last > 0) | ||||||
|  | @ -161,6 +161,7 @@ string baseNameOf(const Path & path) | ||||||
|         pos = 0; |         pos = 0; | ||||||
|     else |     else | ||||||
|         pos += 1; |         pos += 1; | ||||||
|  | 
 | ||||||
|     return string(path, pos, last - pos + 1); |     return string(path, pos, last - pos + 1); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue