bugGNU Octave - Bugs: bug #42426, Ftp mget with directory arg gets...

 
 

bug #42426: Ftp mget with directory arg gets error message and does not download directory contents

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

Add a New Comment Rich Markup
   

Fri 06 Jun 2014 01:21:54 AM UTC, comment #1: 

Confirmed. This error also puts the ftp handle into a very bad state, such that a subsequent


cd (f, "/");
Program received signal SIGSEGV, Segmentation fault.


results in a segfault as shown.

Are you saying it's unclear whether mget should just "download" the directory, or make the directory and include its contents, or download recursively?

Mike Miller <mtmiller>
Group Member
Mon 26 May 2014 12:56:28 AM UTC, original submission:  

The ftp function mget is supposed to be able to take a directory argument.  When used, the directory is created in the local directory. No files from that directory are downloaded).  The download is accompanied by an error message.

When ftp is run from the OS command line, mget <dirname> responds by prompting the user whether or not she wants to download each of the contents of <dirname>.  If the directory actually pre-exists locally, the download succeeds.  If the directory does not yet exist locally, the local directory is NOT created.

In octave, the directory is created if it does not already exist.  With respect to the files in the directory,  the behavior of mget(f,DIRNAME) is the same whether or not the local directory exists: the files are NOT copied.

It is not clear what the behavior should be inside Octave w/r to the files in the remote directory.


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


The error message reads:


error: __ftp_mget__: FTP: couldn't retrieve (RETR failed) the specified file
error: called from:
error:   /usr/local/share/octave/4.1.0+/m/@ftp/mget.m at line 36, column 3


The directory is created:


% ls -lR tmp/Licenses
Licenses:
total 0


$ hg summary
parent: 18781:888f8ce79bbe tip
 maint: Periodic merge gui-release -> default.
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 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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-06-06 mtmiller Item GroupOther Matlab Compatibility
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code