mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	target/ssh: Fix improper use of os.path.basename()
os.path.basename() can give surprising results on folder names:
    os.path.basename('/foo/') == ''
    os.path.basename(os.path.normpath('/foo/')) == 'foo'
			
			
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							2129d85422
						
					
				
				
					commit
					0c72763d2a
				
			@@ -464,7 +464,7 @@ class SshConnection(SshConnectionBase):
 | 
			
		||||
        # inside the destination folder, rather than merging the trees.
 | 
			
		||||
        dst = os.path.join(
 | 
			
		||||
            dst,
 | 
			
		||||
            os.path.basename(src),
 | 
			
		||||
            os.path.basename(os.path.normpath(src)),
 | 
			
		||||
        )
 | 
			
		||||
        return cls._push_folder_internal(sftp, src, dst)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user