revert parentDir change
Reverts 965e106f24
Unfortunately, this caused breakage on Windows, and possibly elsewhere,
because parentDir and takeDirectory do not behave the same when there is a
trailing directory separator.
	
	
This commit is contained in:
		
					parent
					
						
							
								2fff78512d
							
						
					
				
			
			
				commit
				
					
						3bab5dfb1d
					
				
			
		
					 47 changed files with 99 additions and 96 deletions
				
			
		| 
						 | 
				
			
			@ -173,7 +173,7 @@ instance Arbitrary FuzzAction where
 | 
			
		|||
 | 
			
		||||
runFuzzAction :: FuzzAction -> Annex ()
 | 
			
		||||
runFuzzAction (FuzzAdd (FuzzFile f)) = liftIO $ do
 | 
			
		||||
	createDirectoryIfMissing True $ takeDirectory f
 | 
			
		||||
	createDirectoryIfMissing True $ parentDir f
 | 
			
		||||
	n <- getStdRandom random :: IO Int
 | 
			
		||||
	writeFile f $ show n ++ "\n"
 | 
			
		||||
runFuzzAction (FuzzDelete (FuzzFile f)) = liftIO $ nukeFile f
 | 
			
		||||
| 
						 | 
				
			
			@ -210,7 +210,7 @@ genFuzzAction = do
 | 
			
		|||
			case md of
 | 
			
		||||
				Nothing -> genFuzzAction
 | 
			
		||||
				Just d -> do
 | 
			
		||||
					newd <- liftIO $ newDir (takeDirectory $ toFilePath d)
 | 
			
		||||
					newd <- liftIO $ newDir (parentDir $ toFilePath d)
 | 
			
		||||
					maybe genFuzzAction (return . FuzzMoveDir d) newd
 | 
			
		||||
		FuzzDeleteDir _ -> do
 | 
			
		||||
			d <- liftIO existingDir
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue