mirror of
https://github.com/cirruslabs/tart.git
synced 2026-10-08 07:01:14 +02:00
OCI storage: unconditionally remove the old link when link()'ing (#686)
This commit is contained in:
@@ -219,9 +219,7 @@ class VMStorageOCI: PrunableStorage {
|
||||
}
|
||||
|
||||
func link(from: RemoteName, to: RemoteName) throws {
|
||||
if FileManager.default.fileExists(atPath: vmURL(from).path) {
|
||||
try FileManager.default.removeItem(at: vmURL(from))
|
||||
}
|
||||
try? FileManager.default.removeItem(at: vmURL(from))
|
||||
|
||||
try FileManager.default.createSymbolicLink(at: vmURL(from), withDestinationURL: vmURL(to))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user