Skip to content

Commit

Permalink
fix regression that broke unsetting {NEW} inside 2. Releases - New view
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Oct 27, 2023
1 parent 9c31fad commit b4775fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rose/virtualfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ def getattr_release(rp: Path) -> dict[str, Any]:

# {1,2,3}. Releases
if p.release:
if p.view == "New" and not p.release.startswith("{NEW} "):
raise fuse.FuseOSError(errno.ENOENT)
if rp := release_exists(self.config, p.release):
return getattr_release(rp)
raise fuse.FuseOSError(errno.ENOENT)
Expand Down Expand Up @@ -728,9 +730,9 @@ def parse_virtual_path(path: str, *, parse_release_position: bool = True) -> Par
if parts[0] == "2. Releases - New":
if len(parts) == 1:
return ParsedPath(view="New")
if len(parts) == 2 and parts[1].startswith("{NEW} "):
if len(parts) == 2:
return ParsedPath(view="New", release=parts[1])
if len(parts) == 3 and parts[1].startswith("{NEW} "):
if len(parts) == 3:
return ParsedPath(
view="New",
release=parts[1],
Expand Down

0 comments on commit b4775fd

Please sign in to comment.