Skip to content

Commit 7d8aa01

Browse files
HackshavenCopilot
andauthored
Update src/zyra/connectors/backends/ftp.py
The precedence order in this docstring is incomplete. The actual implementation in should_download() includes two additional checks before step 2 (overwrite_existing): checking if the file doesn't exist locally (always download), and checking if the local file is zero bytes (always replace). These should be documented as steps 2 and 3, shifting the other steps down accordingly. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Eric Hackathorn <62408375+Hackshaven@users.noreply.github.com>
1 parent bab4c10 commit 7d8aa01

File tree

1 file changed

+9
-7
lines changed
  • src/zyra/connectors/backends

1 file changed

+9
-7
lines changed

src/zyra/connectors/backends/ftp.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ class SyncOptions:
3737
when a local copy already exists. Options are evaluated in precedence order:
3838
3939
1. ``skip_if_local_done`` - Skip if ``.done`` marker file exists
40-
2. ``overwrite_existing`` - Unconditional replacement
41-
3. ``prefer_remote`` - Always prioritize remote versions
42-
4. ``prefer_remote_if_meta_newer`` - Use frames-meta.json timestamps
43-
5. ``recheck_missing_meta`` - Re-download if metadata entry missing
44-
6. ``min_remote_size`` - Replace if remote exceeds size threshold
45-
7. ``recheck_existing`` - Compare sizes when mtime unavailable
46-
8. Default: Replace if remote mtime (via MDTM) is newer
40+
2. Local file missing - Always download when no local copy is present
41+
3. Local file is zero bytes - Always replace empty local files
42+
4. ``overwrite_existing`` - Unconditional replacement
43+
5. ``prefer_remote`` - Always prioritize remote versions
44+
6. ``prefer_remote_if_meta_newer`` - Use frames-meta.json timestamps
45+
7. ``recheck_missing_meta`` - Re-download if metadata entry missing
46+
8. ``min_remote_size`` - Replace if remote exceeds size threshold
47+
9. ``recheck_existing`` - Compare sizes when mtime unavailable
48+
10. Default: Replace if remote mtime (via MDTM) is newer
4749
"""
4850

4951
overwrite_existing: bool = False

0 commit comments

Comments
 (0)