| OLD | NEW |
| 1 # Copyright 2013 The LUCI Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Provides functions: get_native_path_case(), isabs() and safe_join(). | 5 """Provides functions: get_native_path_case(), isabs() and safe_join(). |
| 6 | 6 |
| 7 This module assumes that filesystem is not changing while current process | 7 This module assumes that filesystem is not changing while current process |
| 8 is running and thus it caches results of functions that depend on FS state. | 8 is running and thus it caches results of functions that depend on FS state. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import ctypes | 11 import ctypes |
| 12 import getpass | 12 import getpass |
| 13 import logging | 13 import logging |
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 errors = [] | 977 errors = [] |
| 978 fs.rmtree(root, onerror=lambda *args: errors.append(args)) | 978 fs.rmtree(root, onerror=lambda *args: errors.append(args)) |
| 979 if errors: | 979 if errors: |
| 980 # There's no hope. | 980 # There's no hope. |
| 981 sys.stderr.write( | 981 sys.stderr.write( |
| 982 'Failed to delete %s. The following files remain:\n' % root) | 982 'Failed to delete %s. The following files remain:\n' % root) |
| 983 for _, path, _ in errors: | 983 for _, path, _ in errors: |
| 984 sys.stderr.write('- %s\n' % path) | 984 sys.stderr.write('- %s\n' % path) |
| 985 raise errors[0][2][0], errors[0][2][1], errors[0][2][2] | 985 raise errors[0][2][0], errors[0][2][1], errors[0][2][2] |
| 986 return False | 986 return False |
| OLD | NEW |