rclone-api 1.5.8__py3-none-any.whl → 1.5.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rclone_api/mount_util.py +13 -10
- {rclone_api-1.5.8.dist-info → rclone_api-1.5.9.dist-info}/METADATA +1 -1
- {rclone_api-1.5.8.dist-info → rclone_api-1.5.9.dist-info}/RECORD +7 -7
- {rclone_api-1.5.8.dist-info → rclone_api-1.5.9.dist-info}/LICENSE +0 -0
- {rclone_api-1.5.8.dist-info → rclone_api-1.5.9.dist-info}/WHEEL +0 -0
- {rclone_api-1.5.8.dist-info → rclone_api-1.5.9.dist-info}/entry_points.txt +0 -0
- {rclone_api-1.5.8.dist-info → rclone_api-1.5.9.dist-info}/top_level.txt +0 -0
rclone_api/mount_util.py
CHANGED
@@ -232,16 +232,19 @@ def clean_mount(mount: Mount | Path, verbose: bool = False, wait=True) -> None:
|
|
232
232
|
if still_exists:
|
233
233
|
verbose_print(f"{mount_path} still exists after unmount attempt.")
|
234
234
|
# Attempt to remove the directory if it is empty.
|
235
|
-
|
236
|
-
|
237
|
-
|
235
|
+
|
236
|
+
# Only remove if the directory is empty.
|
237
|
+
if not any(mount_path.iterdir()):
|
238
|
+
try:
|
238
239
|
mount_path.rmdir()
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
warnings.warn(f"
|
240
|
+
except Exception as e:
|
241
|
+
warnings.warn(f"Error removing mount {mount_path}: {e}")
|
242
|
+
raise
|
243
|
+
if verbose:
|
244
|
+
verbose_print(f"Removed empty mount directory {mount_path}")
|
245
|
+
else:
|
246
|
+
warnings.warn(f"{mount_path} is not empty; cannot remove.")
|
247
|
+
raise OSError(f"{mount_path} is not empty")
|
248
|
+
|
246
249
|
else:
|
247
250
|
verbose_print(f"{mount_path} successfully cleaned up.")
|
@@ -18,7 +18,7 @@ rclone_api/http_server.py,sha256=LhovQu2AI-Z7zQIWflWelCiCDLnWzisL32Rs5350kxE,885
|
|
18
18
|
rclone_api/install.py,sha256=Xb1BRn8rQcSpSd4dzmvIOELP2zM2DytUeIZ6jzv738A,2893
|
19
19
|
rclone_api/log.py,sha256=VZHM7pNSXip2ZLBKMP7M1u-rp_F7zoafFDuR8CPUoKI,1271
|
20
20
|
rclone_api/mount.py,sha256=LZqEhuKZunbWVqmsOIqkkCotaxWJpdFRS1InXveoU5E,1428
|
21
|
-
rclone_api/mount_util.py,sha256=
|
21
|
+
rclone_api/mount_util.py,sha256=7Ky2KXG3YbxftQU8R1DnDzo3hcBpvSmwTPsd0ezHy5g,9058
|
22
22
|
rclone_api/process.py,sha256=tGooS5NLdPuqHh7hCH8SfK44A6LGftPQCPQUNgSo0a0,5714
|
23
23
|
rclone_api/rclone_impl.py,sha256=kr0gvOSuiwxU15rvATYZmSzpWYDiAzjZ2WNe1wqI6NM,46345
|
24
24
|
rclone_api/remote.py,sha256=mTgMTQTwxUmbLjTpr-AGTId2ycXKI9mLX5L7PPpDIoc,520
|
@@ -53,9 +53,9 @@ rclone_api/s3/multipart/upload_parts_inline.py,sha256=V7syKjFyVIe4U9Ahl5XgqVTzt9
|
|
53
53
|
rclone_api/s3/multipart/upload_parts_resumable.py,sha256=diJoUpVYow6No_dNgOZIYVsv43k4evb6zixqpzWJaUk,9771
|
54
54
|
rclone_api/s3/multipart/upload_parts_server_side_merge.py,sha256=Fp2pdrs5dONQI9LkfNolgAGj1-Z2V1SsRd0r0sreuXI,18040
|
55
55
|
rclone_api/s3/multipart/upload_state.py,sha256=f-Aq2NqtAaMUMhYitlICSNIxCKurWAl2gDEUVizLIqw,6019
|
56
|
-
rclone_api-1.5.
|
57
|
-
rclone_api-1.5.
|
58
|
-
rclone_api-1.5.
|
59
|
-
rclone_api-1.5.
|
60
|
-
rclone_api-1.5.
|
61
|
-
rclone_api-1.5.
|
56
|
+
rclone_api-1.5.9.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
57
|
+
rclone_api-1.5.9.dist-info/METADATA,sha256=KDWkgAnwAVHj0GGPDKosvVJrxoJbJW92zYnmIuwPjGQ,32633
|
58
|
+
rclone_api-1.5.9.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
59
|
+
rclone_api-1.5.9.dist-info/entry_points.txt,sha256=fJteOlYVwgX3UbNuL9jJ0zUTuX2O79JFAeNgK7Sw7EQ,255
|
60
|
+
rclone_api-1.5.9.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
61
|
+
rclone_api-1.5.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|