[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat fa
From: |
Richard |
Subject: |
[Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat falis, an error is thrown unnecessarily |
Date: |
Fri, 12 Jul 2019 07:33:53 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 |
Follow-up Comment #4, bug #56618 (project octave):
Incidentally, there is a similar issue when there is a failed call to 'stat'
above:
if (nf == 1)
fn = flst{1};
[st, err, msg] = stat (fn);
if (err < 0)
warning ("dir: 'stat (%s)' failed: %s", fn, msg);
nf = 0;
elseif (S_ISDIR (st.mode))
flst = readdir (flst{1});
nf = numel (flst);
flst = strcat ([fn filesep], flst);
endif
endif
if stat fails, nf is set to zero, then later we try to do this:
info(nf,1).name = ""; # pre-declare size of struct array
which fails with an indexing error as nf is zero. We should probably not enter
the following if statement if nf == 0
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56618>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat falis, an error is thrown unnecessarily, Richard, 2019/07/11
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat falis, an error is thrown unnecessarily, Richard, 2019/07/11
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat falis, an error is thrown unnecessarily, Rik, 2019/07/11
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat falis, an error is thrown unnecessarily, Richard, 2019/07/12
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat falis, an error is thrown unnecessarily,
Richard <=
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat fails, an error is thrown unnecessarily, Rik, 2019/07/12
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat fails, an error is thrown unnecessarily, Richard, 2019/07/15
- [Octave-bug-tracker] [bug #56618] In dir.m, if internal call to lstat fails, an error is thrown unnecessarily, Rik, 2019/07/15