| ... | @@ -84,7 +84,7 @@ pub fn atomicSymLink(allocator: *Allocator, existing_path: []const u8, new_path: | ... | @@ -84,7 +84,7 @@ pub fn atomicSymLink(allocator: *Allocator, existing_path: []const u8, new_path: |
| 84 | try crypto.randomBytes(rand_buf[0..]); | 84 | try crypto.randomBytes(rand_buf[0..]); |
| 85 | base64_encoder.encode(tmp_path[dirname.len + 1 ..], &rand_buf); | 85 | base64_encoder.encode(tmp_path[dirname.len + 1 ..], &rand_buf); |
| 86 | | 86 | |
| 87 | if (cwd().symLink(existing_path, new_path, .{})) { | 87 | if (cwd().symLink(existing_path, tmp_path, .{})) { |
| 88 | return rename(tmp_path, new_path); | 88 | return rename(tmp_path, new_path); |
| 89 | } else |err| switch (err) { | 89 | } else |err| switch (err) { |
| 90 | error.PathAlreadyExists => continue, | 90 | error.PathAlreadyExists => continue, |