Repository navigation
Commit 64456dc
committed
fix(volumecache): normalize bytes dirs to text paths
A bytes dirs entry (e.g. dirs=b"/root/.cache") passed os.fspath unchanged,
so os.walk yielded bytes names and _is_safe_dest compared bytes against str
prefixes, raising TypeError that best-effort mode silently swallowed. Decode
each entry with os.fsdecode so all _dirs are text. Add a regression test.
Addresses review feedback on #531 (carried here as the superseding PR).1 parent bec2c2e commit 64456dc
2 files changed
Lines changed: 18 additions & 1 deletion
File tree
- runpod/serverless/utils
- tests/test_serverless/test_utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
102 | 116 | | |
103 | 117 | | |
104 | 118 | | |
| |||
0 commit comments