added check for file being uploaded at the moment
This commit is contained in:
		
							parent
							
								
									4427198f98
								
							
						
					
					
						commit
						8babb2b2b3
					
				@ -97,6 +97,10 @@ class sftp_remote:
 | 
				
			|||||||
		if local_sha256 == sha256:
 | 
							if local_sha256 == sha256:
 | 
				
			||||||
                    #print('sha confirmed')
 | 
					                    #print('sha confirmed')
 | 
				
			||||||
                    return True
 | 
					                    return True
 | 
				
			||||||
 | 
					                time.sleep(2)
 | 
				
			||||||
 | 
					                sha256_local_upload_check = self.digest(local_path)
 | 
				
			||||||
 | 
					                if sha256 != sha256_local_upload_check:
 | 
				
			||||||
 | 
					                    return False #file is currently being uploaded
 | 
				
			||||||
            except SSHException as e:
 | 
					            except SSHException as e:
 | 
				
			||||||
                print(e)
 | 
					                print(e)
 | 
				
			||||||
                self.remote_error = e
 | 
					                self.remote_error = e
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user