Menu

#1599 Unkwown options <filename> on --getfile

1.1.12
accepted
None
4
2016-08-31
2016-08-28
b2f9h203
No

Hello, when trying

mtp-connect --getfile 3158 copied.jpg

the file gets copied correctly to copied.jpg, but I get this output:

libmtp version: 1.1.12

Device 0 (VID=12d1 and PID=1082) is a Huawei Ascend P8 .
Android device detected, assigning default bug flags
Get file 3158
Getting 3158 to copied.jpg
Unknown options: copied.jpg  (100%)

I.e. it seems --getfile does interpret the next argument as the target, but it doesn't seem to pop the argument from the argument stack and then mpi-connect tries to interpret it as another command line option. I think this should be corrected.

Discussion

  • Marcus Meissner

    Marcus Meissner - 2016-08-28

    usually a binary called mtp-getfile is built that supports a space seperated list.

    if you use mtp-connect --getfile , the current code wants it seperated by ,

    mtp-connect --getfile 3158,copied.jpg

     
  • b2f9h203

    b2f9h203 - 2016-08-28

    Ah ok, thank you.

    mtp-connect --getfile 117,test.jpg
    

    Works perfectly. I.e. the no warning and the file is correctly named test.jpg

    In that case the usage should be updated, because when running mtp-connect without arguments I get:

    Usage: connect <command1> <command2>
    Commands: --delete [filename]
              --sendfile [source] [destination]
              --sendtrack [source] [destination]
              --getfile [source] [destination]
              --newfolder [foldername]
    

    where source and destination are separated by space. I mean, space works, the file name will be correctly used, but that Unknown option warning appears.

     
  • Reverend Homer

    Reverend Homer - 2016-08-31
    • status: open --> accepted
    • assigned_to: Reverend Homer
    • Group: unknown release (please set) --> 1.1.12
    • Priority: 1 --> 4
     

Anonymous
Anonymous

Add attachments
Cancel