diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2021-04-16 12:33:04 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2021-04-16 12:34:20 -0700 |
| commit | ea0ca7e72177d5fb0f6f921aaa767a11262c0f1a (patch) | |
| tree | 62def2627f4e3b0d30a8524b1869cc1083e7a30f /ipn/backend.go | |
| parent | b85d80b37fbc46e65040d82294d25ebb95a8fa42 (diff) | |
| download | tailscale-bradfitz/macos_progress.tar.xz tailscale-bradfitz/macos_progress.zip | |
ipn{,/ipnlocal}: in direct file receive mode, don't rename partial filebradfitz/macos_progress
Let caller (macOS) do it so Finder progress bar can be dismissed
without races.
Updates tailscale/corp#1575
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'ipn/backend.go')
| -rw-r--r-- | ipn/backend.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ipn/backend.go b/ipn/backend.go index 8216d30b3..102dc2c97 100644 --- a/ipn/backend.go +++ b/ipn/backend.go @@ -95,12 +95,15 @@ type PartialFile struct { DeclaredSize int64 // or -1 if unknown Received int64 // bytes copied thus far - // FinalPath is non-empty when the final has been completely - // written and renamed into place. This is then the complete - // path to the file post-rename. This is only set in - // "direct" file mode where the peerapi isn't being used; see - // LocalBackend.SetDirectFileRoot. - FinalPath string `json:",omitempty"` + // PartialPath is set non-empty in "direct" file mode to the + // in-progress '*.partial' file's path when the peerapi isn't + // being used; see LocalBackend.SetDirectFileRoot. + PartialPath string `json:",omitempty"` + + // Done is set in "direct" mode when the partial file has been + // closed and is ready for the caller to rename away the + // ".partial" suffix. + Done bool `json:",omitempty"` } // StateKey is an opaque identifier for a set of LocalBackend state |
