bugGNU Octave - Bugs: bug #40274, unpack error on failure to move...


bug #40274: unpack error on failure to move files into destination dir

Submitted by:  Muhali <muhali>
Submitted on:  Tue 15 Oct 2013 08:45:10 AM UTC  
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Tue 22 Oct 2013 01:47:19 AM UTC, comment #4:

Confirmed in two cases. First, your case where you are unpacking from a URL string into /tmp. This is because the URL is first saved to a temporary file in /tmp and then the unpack function fails to recognize that the file is already in /tmp so it doesn't need to be moved.

The other case is when an absolute or relative path are given to a file to unpack and the destination directory is actually the same path.

There is logic in the function already to try to figure out when it needs to move files or not, but that only works if the first argument is a plain file with no path component.

Mike Miller <mtmiller>
Project Member
Tue 15 Oct 2013 11:37:59 AM UTC, comment #3:

well, savannah does not like my quoted text. Here it is unquoted:

unpack("http://mirrors.ctan.org/support/tex2rtf/rtfutils/rtftohtml/README.gz", "/tmp")

Muhali <muhali>
Tue 15 Oct 2013 11:34:55 AM UTC, comment #2:

one more time:

Muhali <muhali>
Tue 15 Oct 2013 11:32:33 AM UTC, comment #1:

Sorry, the first command was meant to be

Muhali <muhali>
Tue 15 Oct 2013 08:45:10 AM UTC, original submission:

unpacking into /tmp produces the following:

mv: `/tmp/oct-WqCcGr' and `/tmp/oct-WqCcGr' are the same file
error: unpack: unable to move files to "/tmp":
error: called from:
error: /usr/local/share/octave/3.7.7+/m/miscellaneous/unpack.m at line 207, column 9

Corresponding errors occur with unpacking tar files. For example,

just produces a copy of bc-1.03.tar.gz in /tmp. In contrast,

does extract into /tmp/foo.

Muhali <muhali>


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by muhali (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Oct 2013 01:47:19 AM UTCmtmillerCategoryNone=>Octave Function
      Item GroupNone=>Incorrect Result
      Summaryunpack into /tmp name clash=>unpack error on failure to move files into destination dir

    Back to the top

    Powered by Savane 3.1-cleanup