浏览文件
0015-stable-cage-storage-anchor.patch
16 行 · 684 B历史下载| 1 | diff --git a/pkg/limatype/dirnames/dirnames.go b/pkg/limatype/dirnames/dirnames.go |
| 2 | index 136c766..71ec9c2 100644 |
| 3 | --- a/pkg/limatype/dirnames/dirnames.go |
| 4 | +++ b/pkg/limatype/dirnames/dirnames.go |
| 5 | func LimaDir() (string, error) { |
| 6 | } |
| 7 | dir = filepath.Join(homeDir, DotLima) |
| 8 | } |
| 9 | + // Cage keeps a stable logical path for QEMU backing files, SSH and sockets |
| 10 | + // when the profile's private VM storage is moved to another volume. |
| 11 | + if stable := os.Getenv("CAGE_LOGICAL_LIMA_HOME"); stable != "" && filepath.Clean(dir) == filepath.Clean(stable) { |
| 12 | + return filepath.Clean(dir), nil |
| 13 | + } |
| 14 | if _, err := os.Stat(dir); errors.Is(err, os.ErrNotExist) { |
| 15 | return dir, nil |
| 16 | } |

