prim_toPath: Actually make the string a path
This commit is contained in:
		
							parent
							
								
									dde6486eab
								
							
						
					
					
						commit
						2980d1fba9
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -517,7 +517,9 @@ static void prim_toPath(EvalState & state, Value * * args, Value & v) | ||||||
| { | { | ||||||
|     PathSet context; |     PathSet context; | ||||||
|     Path path = state.coerceToPath(*args[0], context); |     Path path = state.coerceToPath(*args[0], context); | ||||||
|     mkString(v, canonPath(path), context); |     if (!context.empty()) | ||||||
|  |         throw EvalError(format("string `%1%' cannot refer to other paths") % path); | ||||||
|  |     mkPath(v, canonPath(path).c_str()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue