diff options
author | fiaxh <git@lightrise.org> | 2019-02-13 21:50:15 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-02-14 00:04:01 +0100 |
commit | 736522737f4dae39af126353abfe26903b2c82ea (patch) | |
tree | c0e607550476b779e263fd772894e5816ee645cd /plugins/http-files | |
parent | d668e0158df40e1bb1ea00ab72fac9d0e95e8bd9 (diff) | |
download | dino-736522737f4dae39af126353abfe26903b2c82ea.tar.gz dino-736522737f4dae39af126353abfe26903b2c82ea.zip |
Make file read/write async
Diffstat (limited to 'plugins/http-files')
-rw-r--r-- | plugins/http-files/src/file_provider.vala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala index 553068cc..80f99fa6 100644 --- a/plugins/http-files/src/file_provider.vala +++ b/plugins/http-files/src/file_provider.vala @@ -114,10 +114,10 @@ public class FileProvider : Dino.FileProvider, Object { } OutputStream os = file.create(FileCreateFlags.REPLACE_DESTINATION); - os.splice(file_transfer.input_stream, 0); + yield os.splice_async(file_transfer.input_stream, 0); os.close(); file_transfer.path = file.get_basename(); - file_transfer.input_stream = file.read(); + file_transfer.input_stream = yield file.read_async(); file_transfer.state = FileTransfer.State.COMPLETE; } catch (Error e) { |