stip 'file://' at file_path start
This commit is contained in:
parent
1cedc6cc3a
commit
0e0ef34b26
1 changed files with 2 additions and 1 deletions
|
@ -240,10 +240,11 @@ class SignalObject(DbusPrototype):
|
||||||
send file, located at 'file_path' to 'jid', using account
|
send file, located at 'file_path' to 'jid', using account
|
||||||
(optional) 'account' '''
|
(optional) 'account' '''
|
||||||
file_path, jid, account = self._get_real_arguments(args, 3)
|
file_path, jid, account = self._get_real_arguments(args, 3)
|
||||||
|
|
||||||
connected_account, contact = self.get_account_and_contact(account, jid)
|
connected_account, contact = self.get_account_and_contact(account, jid)
|
||||||
|
|
||||||
if connected_account:
|
if connected_account:
|
||||||
|
if file_path[:7] == 'file://':
|
||||||
|
file_path=file_path[7:]
|
||||||
if os.path.isfile(file_path): # is it file?
|
if os.path.isfile(file_path): # is it file?
|
||||||
gajim.interface.instances['file_transfers'].send_file(
|
gajim.interface.instances['file_transfers'].send_file(
|
||||||
connected_account, contact, file_path)
|
connected_account, contact, file_path)
|
||||||
|
|
Loading…
Add table
Reference in a new issue