Skip to content

Commit

Permalink
get_mtime_and_size: move working tree assertion after veryfing dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pared committed Jan 3, 2020
1 parent 1e1a9cf commit 3642738
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dvc/utils/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ def get_inode(path):


def get_mtime_and_size(path, tree):
assert is_working_tree(tree)

if os.path.isdir(fspath_py35(path)):
assert is_working_tree(tree)

size = 0
files_mtimes = {}
for file_path in tree.walk_files(path):
Expand Down

0 comments on commit 3642738

Please sign in to comment.