(silent=False)
| 7029 | 'is_dir': os.path.isdir(target), |
| 7030 | } |
| 7031 | try: |
| 7032 | _save_trash_index(index) |
| 7033 | except Exception: |
| 7034 | # Keep deletion transactional: if metadata cannot be committed, put the item back. |
| 7035 | try: |
| 7036 | if os.path.exists(target) and not os.path.exists(path): |
| 7037 | shutil.move(target, path) |
| 7038 | finally: |
| 7039 | raise |
| 7040 | return index[item_id] |
| 7041 |
no test coverage detected