Task #2079
delete existing otr_keystore.ofcaes off of device before sync
Status: | New | Start date: | 10/14/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | 0.3 | |||
Component: |
Description
MTP does not allow you to overwrite an existing file. KeySync should first try deleting otr_keystore.ofcaes before syncing so that it won't barf if there happens to be a file there. MTP is a pain in the ass here, you have to work with file ID numbers, not file names. You can get a full listing of all files on the device, but that can take a very long time. I think the best approach will be to use LIBMTP_Get_Files_And_Folders
since it just lists what's in a single folder rather than everything. LIBMTP_Get_Files_And_Folders
is not currently implemented in pymtp
but it should be quite easy to add it there.
Related issues
History
#1 Updated by abeluck over 4 years ago
When the keysync file already exists and a copy is attempted, this results in a segfault. 0.2 will ship with this behavior unfortunately.
#2 Updated by abeluck over 4 years ago
Example segfault:
mtp: connect Device 0 (VID=0fce and PID=0194) is a SONY Xperia Tablet Z MTP. Android device detected, assigning default bug flags mtp: sendfile /tmp/.keysync-fpL5go/otr_keystore.ofcaes otr_keystore.ofcaes Segmentation fault (core dumped)