Merge branch 'dirOf-relative' of https://github.com/lheckemann/nix
This commit is contained in:
		
						commit
						8327a7a8fa
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -167,7 +167,7 @@ Path dirOf(const Path & path) | |||
| { | ||||
|     Path::size_type pos = path.rfind('/'); | ||||
|     if (pos == string::npos) | ||||
|         throw Error(format("invalid file name '%1%'") % path); | ||||
|         return "."; | ||||
|     return pos == 0 ? "/" : Path(path, 0, pos); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue