Check existence before remove symlink when deploying
This commit is contained in:
		
							parent
							
								
									340c788c7f
								
							
						
					
					
						commit
						8a22d1fa93
					
				
							
								
								
									
										3
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								main.py
									
									
									
									
									
								
							|  | @ -118,7 +118,8 @@ class FileManager: | ||||||
|             return False |             return False | ||||||
| 
 | 
 | ||||||
|         self.logger.info("Recreating symlink point to {}".format(extract_dir)) |         self.logger.info("Recreating symlink point to {}".format(extract_dir)) | ||||||
|         os.remove(self.symlink_path) |         if Path(self.symlink_path).exists(): | ||||||
|  |             os.remove(self.symlink_path) | ||||||
|         os.symlink(extract_dir, self.symlink_path) |         os.symlink(extract_dir, self.symlink_path) | ||||||
| 
 | 
 | ||||||
|         return True |         return True | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 leafee98
						leafee98