equal
deleted
inserted
replaced
197 |
197 |
198 try: |
198 try: |
199 return fcntl.fcntl(fd, F_GETPATH, '\0' * 1024).rstrip('\0') |
199 return fcntl.fcntl(fd, F_GETPATH, '\0' * 1024).rstrip('\0') |
200 finally: |
200 finally: |
201 os.close(fd) |
201 os.close(fd) |
|
202 elif sys.version_info < (2, 4, 2, 'final'): |
|
203 # Workaround for http://bugs.python.org/issue1213894 (os.path.realpath |
|
204 # didn't resolve symlinks that were the first component of the path.) |
|
205 def realpath(path): |
|
206 if os.path.isabs(path): |
|
207 return os.path.realpath(path) |
|
208 else: |
|
209 return os.path.realpath('./' + path) |
202 else: |
210 else: |
203 # Fallback to the likely inadequate Python builtin function. |
211 # Fallback to the likely inadequate Python builtin function. |
204 realpath = os.path.realpath |
212 realpath = os.path.realpath |
205 |
213 |
206 def shellquote(s): |
214 def shellquote(s): |