Windows symlink: full path get_cwd() for state file

This commit is contained in:
Dmitry Petrov
2017-04-10 09:55:07 -07:00
parent d1d22643bc
commit cf2b7c097c
+2 -1
View File
@@ -4,6 +4,7 @@ import json
import time
from dvc.exceptions import DvcException
from dvc.git_wrapper import GitWrapperI
class StateFileError(DvcException):
@@ -126,7 +127,7 @@ class StateFile(object):
return result
def get_dvc_path(self):
pwd = os.path.realpath(os.curdir)
pwd = GitWrapperI.get_cwd()
if not pwd.startswith(self.git.git_dir_abs):
raise StateFileError('the file cannot be created outside of a git repository')