Skip to content

Commit

Permalink
fix bug in lpath download(cache=True) (#525)
Browse files Browse the repository at this point in the history
* fix bug in lpath download(cache=True)

* fixes to api
  • Loading branch information
rteqs authored Feb 20, 2025
1 parent 64779c5 commit e2324ad
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Types of changes

# Latch SDK Changelog

## 2.56.5 - 2025-02-20

* Fix bug in `LPath` where `download` with `cache=True` set would fail on a file already present on the file system without the user.version_id xattr

## 2.56.5 - 2025-02-19

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include = ["src/**/*.py", "src/latch_cli/services/init/*"]

[project]
name = "latch"
version = "2.56.5"
version = "2.56.6"
description = "The Latch SDK"
authors = [{ name = "Kenny Workman", email = "[email protected]" }]
maintainers = [
Expand Down
3 changes: 2 additions & 1 deletion src/latch/ldata/path.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import atexit
import os
import re
import shutil
import sys
Expand Down Expand Up @@ -348,6 +347,8 @@ def download(
not_windows
and cache
and dst.exists()
and xattr.listxattr(dst_str) is not None
and "user.version_id" in xattr.listxattr(dst_str)
and version_id == xattr.getxattr(dst_str, "user.version_id").decode()
):
return dst
Expand Down
40 changes: 25 additions & 15 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e2324ad

Please sign in to comment.