equal
deleted
inserted
replaced
687 |
687 |
688 def checklink(path): |
688 def checklink(path): |
689 """check whether the given path is on a symlink-capable filesystem""" |
689 """check whether the given path is on a symlink-capable filesystem""" |
690 # mktemp is not racy because symlink creation will fail if the |
690 # mktemp is not racy because symlink creation will fail if the |
691 # file already exists |
691 # file already exists |
692 name = tempfile.mktemp(dir=path) |
692 name = tempfile.mktemp(dir=path, prefix='hg-checklink-') |
693 try: |
693 try: |
694 os.symlink(".", name) |
694 os.symlink(".", name) |
695 os.unlink(name) |
695 os.unlink(name) |
696 return True |
696 return True |
697 except (OSError, AttributeError): |
697 except (OSError, AttributeError): |