Skip to content

Commit

Permalink
OCI storage: unconditionally remove the old link when link()'ing (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev authored Dec 8, 2023
1 parent 02f1ff5 commit 537f0ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/tart/VMStorageOCI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 537f0ae

Please sign in to comment.