Show More
@@ -793,12 +793,16 b' def checkexec(path):' | |||||
793 |
|
793 | |||
794 | Requires a directory (like /foo/.hg) |
|
794 | Requires a directory (like /foo/.hg) | |
795 | """ |
|
795 | """ | |
796 | fh, fn = tempfile.mkstemp("", "", path) |
|
796 | try: | |
797 | os.close(fh) |
|
797 | fh, fn = tempfile.mkstemp("", "", path) | |
798 | m = os.stat(fn).st_mode |
|
798 | os.close(fh) | |
799 | os.chmod(fn, m ^ 0111) |
|
799 | m = os.stat(fn).st_mode | |
800 | r = (os.stat(fn).st_mode != m) |
|
800 | os.chmod(fn, m ^ 0111) | |
801 | os.unlink(fn) |
|
801 | r = (os.stat(fn).st_mode != m) | |
|
802 | os.unlink(fn) | |||
|
803 | except (IOError,OSError): | |||
|
804 | # we don't care, the user probably won't be able to commit anyway | |||
|
805 | return False | |||
802 | return r |
|
806 | return r | |
803 |
|
807 | |||
804 | def execfunc(path, fallback): |
|
808 | def execfunc(path, fallback): |
General Comments 0
You need to be logged in to leave comments.
Login now