Show More
@@ -693,6 +693,20 b' def checkfolding(path):' | |||||
693 | except: |
|
693 | except: | |
694 | return True |
|
694 | return True | |
695 |
|
695 | |||
|
696 | def checkexec(path): | |||
|
697 | """ | |||
|
698 | Check whether the given path is on a filesystem with UNIX-like exec flags | |||
|
699 | ||||
|
700 | Requires a directory (like /foo/.hg) | |||
|
701 | """ | |||
|
702 | fh, fn = tempfile.mkstemp("", "", path) | |||
|
703 | os.close(fh) | |||
|
704 | m = os.stat(fn).st_mode | |||
|
705 | os.chmod(fn, m ^ 0111) | |||
|
706 | r = (os.stat(fn).st_mode != m) | |||
|
707 | os.unlink(fn) | |||
|
708 | return r | |||
|
709 | ||||
696 | # Platform specific variants |
|
710 | # Platform specific variants | |
697 | if os.name == 'nt': |
|
711 | if os.name == 'nt': | |
698 | import msvcrt |
|
712 | import msvcrt |
General Comments 0
You need to be logged in to leave comments.
Login now