taildrop: remove breaking abstraction layers for apple (#10728)
Removes the avoidFinalRename logic and all associated code as it is no longer required by the Apple clients. Enables resume logic to be usable for Apple clients. Fixes tailscale/corp#14772 Signed-off-by: Rhea Ghosh <rhea@tailscale.com>
This commit is contained in:
@@ -90,15 +90,6 @@ type ManagerOptions struct {
|
||||
// copy them out, and then delete them.
|
||||
DirectFileMode bool
|
||||
|
||||
// AvoidFinalRename specifies whether in DirectFileMode
|
||||
// we should avoid renaming "foo.jpg.partial" to "foo.jpg" after reception.
|
||||
//
|
||||
// TODO(joetsai,rhea): Delete this. This is currently depended upon
|
||||
// in the Apple platforms since it violates the abstraction layer
|
||||
// and directly assumes how taildrop represents partial files.
|
||||
// Right now, file resumption does not work on Apple.
|
||||
AvoidFinalRename bool
|
||||
|
||||
// SendFileNotify is called periodically while a file is actively
|
||||
// receiving the contents for the file. There is a final call
|
||||
// to the function when reception completes.
|
||||
@@ -244,6 +235,7 @@ func (m *Manager) IncomingFiles() []ipn.PartialFile {
|
||||
DeclaredSize: f.size,
|
||||
Received: f.copied,
|
||||
PartialPath: f.partialPath,
|
||||
FinalPath: f.finalPath,
|
||||
Done: f.done,
|
||||
})
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user