fold parseLinkTarget into parseLinkTargetOrPointer
Only one place remained that differentiated between them. It is the case that a symlink target that happens to contain a newline somehow will be treated as a link to a key truncated at the newline. This is super unlikely to happen, and since a key cannot actually contain a newline, it's as good a behavior as any. Anyway, this commit does not change the behavior there, although arguably it should be changed. Note that getAnnexLinkTarget does prevent a symlink target containing a newline. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
		
					parent
					
						
							
								38816a9ae9
							
						
					
				
			
			
				commit
				
					
						4cd9325c2c
					
				
			
		
					 2 changed files with 13 additions and 15 deletions
				
			
		|  | @ -265,7 +265,7 @@ onAddFile' contentchanged addassociatedfile addlink samefilestatus symlinkssuppo | |||
| 			case linktarget of | ||||
| 				Nothing -> a | ||||
| 				Just lt -> do | ||||
| 					case parseLinkTarget lt of | ||||
| 					case parseLinkTargetOrPointer lt of | ||||
| 						Nothing -> noop | ||||
| 						Just key -> liftAnnex $ | ||||
| 							addassociatedfile key file | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Joey Hess
				Joey Hess