Show More
@@ -850,12 +850,16 b' def checkexec(path):' | |||||
850 |
|
850 | |||
851 | Requires a directory (like /foo/.hg) |
|
851 | Requires a directory (like /foo/.hg) | |
852 | """ |
|
852 | """ | |
853 | fh, fn = tempfile.mkstemp("", "", path) |
|
853 | try: | |
854 | os.close(fh) |
|
854 | fh, fn = tempfile.mkstemp("", "", path) | |
855 | m = os.stat(fn).st_mode |
|
855 | os.close(fh) | |
856 | os.chmod(fn, m ^ 0111) |
|
856 | m = os.stat(fn).st_mode | |
857 | r = (os.stat(fn).st_mode != m) |
|
857 | os.chmod(fn, m ^ 0111) | |
858 | os.unlink(fn) |
|
858 | r = (os.stat(fn).st_mode != m) | |
|
859 | os.unlink(fn) | |||
|
860 | except (IOError,OSError): | |||
|
861 | # we don't care, the user probably won't be able to commit anyway | |||
|
862 | return False | |||
859 | return r |
|
863 | return r | |
860 |
|
864 | |||
861 | def execfunc(path, fallback): |
|
865 | def execfunc(path, fallback): |
General Comments 0
You need to be logged in to leave comments.
Login now