-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FTPFileProvider is downloading file twice #152
Comments
Update: I created a simple "sample.txt" at the root of my ftp server (text inside :
But it also does this twice! The output for the "sample.txt" file is:
Why is it calling this twice too? I'm only calling my function once and "start download" is also only printed once. |
Update 2: I did some more investigating and found out what's called twice in the It's the whole
The same question remains though: Why is it calling these functions twice and how do I fix this? |
I'm using your library to log into my FTP server and download a file but
func copyItem(path: String, toLocalURL destURL: URL, completionHandler: SimpleCompletionHandler) -> Progress?
(only function for downloading I've found) doesn't support overwriting.
So while the first try to download the file to the app's "Documents" folder always succeeds, the second one always fails because the file already exists.
My code:
As you can see, I added my own check for already existing files but unfortunately this doesn't help with the second try.
Why is it even trying to download the file twice? Is there maybe some hidden function for downloading that does support overwriting?
How can I fix this?
The text was updated successfully, but these errors were encountered: