diff --git a/deluge/ui/gtkui/ipcinterface.py b/deluge/ui/gtkui/ipcinterface.py index ba2f7c789..2ee48fd21 100644 --- a/deluge/ui/gtkui/ipcinterface.py +++ b/deluge/ui/gtkui/ipcinterface.py @@ -163,4 +163,4 @@ def process_args(args): component.get("AddTorrentDialog").show(config["focus_add_dialog"]) else: path = os.path.abspath(arg) - client.core.add_torrent_file(os.path.split(path)[-1], base64.encodestring(open(path).read()), None) + client.core.add_torrent_file(os.path.split(path)[-1], base64.encodestring(open(path, "rb").read()), None)