bugGNU Octave - Bugs: bug #42430, @ftp/mget ignores target argument

 
 

bug #42430: @ftp/mget ignores target argument

Submitter:  Allan Jacobs <allanjacobs>
Submitted:  Mon 26 May 2014 04:03:12 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  allanjacobs Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 25 Nov 2015 08:14:37 PM UTC, comment #3: 

Pantxo just added support for the TARGET argument to mget one week ago.  See http://hg.savannah.gnu.org/hgweb/octave/rev/73800f39da6f.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Sun 27 Jul 2014 08:16:20 PM UTC, comment #2: 

Looking at the code, its pretty easy to pass the 3rd argument if specified.

In the C function _ftp_mget_, in urlwrite.cc has the supporting code for the destination, but expects it to be a directory to put the files/directories.

According to MATLAB, for the same function, it is documented as a absolute local path name to put the files. 

The Octave documentation says:

"if the target is given, then a single file or directory will be downloaded to the local directory and the local name will be changed to target.


So should this function be following the MATLAB function, and require a change to the documentation, or changes to the code to support target filenames.

John Donoghue <lostbard>
Group Member
Fri 06 Jun 2014 01:04:01 AM UTC, comment #1: 

Confirmed, the third argument is not even used in the Octave @ftp/mget function.

Mike Miller <mtmiller>
Group Member
Mon 26 May 2014 04:03:12 PM UTC, original submission:  

mget(ftpobj,contents,target) ignores 'target.'  According to Matlab documentation, this is a "string enclosed in single quotation marks that specifies the absolute or relative path of the local folder to contain the downloaded contents."


f=ftp('ftp.gnu.org','anonymous','testpw@test.com')
cd(f,'/gnu/Licenses')
cd('tmp')
ascii(f)
mget(f, 'lgpl-3.0.txt', 'junk.txt')


The file is downloaded into tmp/lgpl-3.0.txt and should be downloaded into tmp/junk.txt.


$ hg summary
parent: 18782:5556ddfb841b tip
 spdiags.m: Treat sub/super-diagonals the same as Matlab.
branch: default
bookmarks: *@
commit: 7477 unknown (clean)
update: (current)


Allan Jacobs <allanjacobs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by allanjacobs (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-25 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Carbon-Copy- Added pantxo
    2014-06-06 mtmiller StatusNone Confirmed
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code