octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41234] imread will not work with URLS


From: John Donoghue
Subject: [Octave-bug-tracker] [bug #41234] imread will not work with URLS
Date: Wed, 15 Jan 2014 20:44:56 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)

Follow-up Comment #5, bug #41234 (project octave):

hmmm ... maybe?

It should only be:
add variable to track if need delete file, and protect:

# keep track of if need to delete a tmp file
delete_file = false;
  
unwind_protect


Attempt to get the the file with urlwrite if couldnt find it locally (where it
was reporting couldnt find the file).

[fn, status, msg] = urlwrite (filename, tmpnam ());
if (! status)
  error ("imread: cannot find or download %s", filename);
endif
delete_file = true;


And the cleanup at the end of the function:

unwind_protect_cleanup
  if (delete_file)
    unlink (fn);
  endif
end_unwind_protect


And some changes in the indenting because of the unwind_protect block.

In the version I was looking at, there wasnt any shared code for that section
of the changes - but I did base my changes on what imfinfo was doing.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41234>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]