mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
ssh: stat -> lstat
This commit is contained in:
@@ -60,13 +60,13 @@ class SSHConnection:
|
||||
|
||||
def st_mode(self, path):
|
||||
with ignore_file_not_found():
|
||||
return self.sftp.stat(path).st_mode
|
||||
return self.sftp.lstat(path).st_mode
|
||||
|
||||
return 0
|
||||
|
||||
def getsize(self, path):
|
||||
with ignore_file_not_found():
|
||||
return self.sftp.stat(path).st_size
|
||||
return self.sftp.lstat(path).st_size
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@ def test_walk(tmp_path, ssh):
|
||||
reason="Only works on OSX (because of APFS)")
|
||||
def test_reflink(chdir_tmp, foo, ssh):
|
||||
ssh.reflink("foo", "bar")
|
||||
assert System.is_reflink(bar_path)
|
||||
assert filecmp.cmp("foo", "bar")
|
||||
assert not System.is_symlink("bar")
|
||||
assert not System.is_hardlink("bar")
|
||||
|
||||
@pytest.mark.skip(reason="MockSSH doesn't support symlinks")
|
||||
def test_symlink(chdir_tmp, foo, ssh):
|
||||
|
||||
Reference in New Issue
Block a user