Fixed issue 467, exception when deleting an orphan git repo.
This commit is contained in:
		
				
					committed by
					
						
						Loic d'Anterroches
					
				
			
			
				
	
			
			
			
						parent
						
							89780b0317
						
					
				
				
					commit
					430c9cb00e
				
			
							
								
								
									
										2
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								AUTHORS
									
									
									
									
									
								
							@@ -23,6 +23,8 @@ Much appreciated contributors:
 | 
			
		||||
    Ludovic Bellière
 | 
			
		||||
    Brian Armstrong
 | 
			
		||||
    Raphaël Emourgeon
 | 
			
		||||
    Jakub Viták
 | 
			
		||||
    Vladimir Solomatin
 | 
			
		||||
 | 
			
		||||
And all the nice users who spent time reporting issues and promoting
 | 
			
		||||
the project. The project could not live without them.
 | 
			
		||||
 
 | 
			
		||||
@@ -99,6 +99,7 @@ class IDF_Plugin_SyncGit_Cron
 | 
			
		||||
        if (count($orphans)) {
 | 
			
		||||
            $cmd = Pluf::f('idf_exec_cmd_prefix', '').'rm -rf '.implode(' ', $orphans);
 | 
			
		||||
            exec($cmd);
 | 
			
		||||
            clearstatcache();
 | 
			
		||||
            while (list(, $project) = each($orphans)) {
 | 
			
		||||
                if (is_dir($project)) {
 | 
			
		||||
                    throw new Exception(sprintf('Cannot remove %s directory.', $project));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user