rclone-api 1.0.19__py2.py3-none-any.whl → 1.0.20__py2.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/rclone.py CHANGED
@@ -4,6 +4,7 @@ Unit test file.
4
4
 
5
5
  import subprocess
6
6
  import time
7
+ import warnings
7
8
  from concurrent.futures import ThreadPoolExecutor
8
9
  from fnmatch import fnmatch
9
10
  from pathlib import Path
@@ -15,7 +16,6 @@ from rclone_api.convert import convert_to_filestr_list, convert_to_str
15
16
  from rclone_api.dir_listing import DirListing
16
17
  from rclone_api.exec import RcloneExec
17
18
  from rclone_api.file import File
18
- from rclone_api.filelist import FileList
19
19
  from rclone_api.process import Process
20
20
  from rclone_api.remote import Remote
21
21
  from rclone_api.rpath import RPath
@@ -174,9 +174,7 @@ class Rclone:
174
174
  # self._run(cmd_list)
175
175
  executor.submit(self._run, cmd_list)
176
176
 
177
- def copy(
178
- self, src: Dir | str, dst: Dir | str, filelist: FileList | None = None
179
- ) -> subprocess.CompletedProcess:
177
+ def copy(self, src: Dir | str, dst: Dir | str) -> subprocess.CompletedProcess:
180
178
  """Copy files from source to destination.
181
179
 
182
180
  Args:
@@ -275,6 +273,12 @@ class Rclone:
275
273
  f"Mount directory already exists and is not empty: {outdir}"
276
274
  )
277
275
  outdir.rmdir()
276
+ try:
277
+ outdir.parent.mkdir(parents=True, exist_ok=True)
278
+ except PermissionError:
279
+ warnings.warn(
280
+ f"Permission error creating parent directory: {outdir.parent}"
281
+ )
278
282
  src_str = convert_to_str(src)
279
283
  cmd_list: list[str] = ["mount", src_str, str(outdir)]
280
284
  if not allow_writes:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rclone_api
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: rclone api in python
5
5
  Home-page: https://github.com/zackees/rclone-api
6
6
  Maintainer: Zachary Vorhies
@@ -8,14 +8,14 @@ rclone_api/exec.py,sha256=9qSOpZo8YRYxv3hOvNr57ApnY2KbjxwT1QNr8OgcLM4,883
8
8
  rclone_api/file.py,sha256=D02iHJW1LhfOiM_R_yPHP8_ApnDiYrkuraVcrV8-qkw,1246
9
9
  rclone_api/filelist.py,sha256=xbiusvNgaB_b_kQOZoHMJJxn6TWGtPrWd2J042BI28o,767
10
10
  rclone_api/process.py,sha256=C7vdGEvIKcI4fx-Z702wK1qomzSsFpdke2SQnBHxd-Y,3660
11
- rclone_api/rclone.py,sha256=PTHimJPPqRe-iSqe08zv1FrFB_H2T1eD3Y0WgshEye8,12730
11
+ rclone_api/rclone.py,sha256=MyFpjzC1Dh5TJbuulraXdtVSPAS3zuERrDj5TIdam6o,12887
12
12
  rclone_api/remote.py,sha256=c9hlRKBCg1BFB9MCINaQIoCg10qyAkeqiS4brl8ce-8,343
13
13
  rclone_api/rpath.py,sha256=8ZA_1wxWtskwcy0I8V2VbjKDmzPkiWd8Q2JQSvh-sYE,2586
14
14
  rclone_api/util.py,sha256=BDRJ2MIceDoKVTjUQBwyhjbA8UwPrZ-0ZSa9xyMJd0E,3343
15
15
  rclone_api/walk.py,sha256=kca0t1GAnF6FLclN01G8NG__Qe-ggodLtAbQSHyVPng,2968
16
16
  rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
17
- rclone_api-1.0.19.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
18
- rclone_api-1.0.19.dist-info/METADATA,sha256=MFSLZe61zLT-ZKKoPb9UiN-r0A-ZbFzQvmo8S-FUnuc,4454
19
- rclone_api-1.0.19.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
20
- rclone_api-1.0.19.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
21
- rclone_api-1.0.19.dist-info/RECORD,,
17
+ rclone_api-1.0.20.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
18
+ rclone_api-1.0.20.dist-info/METADATA,sha256=XfXp7UbwmdR0PtTwH7m_w3K9ZmIPQx0VZuRI9G7Zlb8,4454
19
+ rclone_api-1.0.20.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
20
+ rclone_api-1.0.20.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
21
+ rclone_api-1.0.20.dist-info/RECORD,,