[bug #68572] Load unable to find mat file in subdirectory just after save

Alexis THIBAULT <[email protected]> Tue, 28 Jul 2026 05:10:15 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
--===============4450620052454294808==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

UGxlYXNlIHVzZSB0aGUgYnVnIHRyYWNrZXIgdG8gcG9zdCB1cGRhdGVzIHRvIGEgYnVnIHJlcG9y
dC4gIFRoZSBtYWlsaW5nIGxpc3QgaXMgaW50ZW5kZWQgYXMgYSByZWFkLW9ubHkgbm90aWZpY2F0
aW9uIHN0cmVhbS4gIEluZm8gcG9zdGVkIHRvIHRoaXMgbWFpbGluZyBsaXN0IGFkZHJlc3Mgd29u
J3QgYXBwZWFyIGluIHRoZSB0cmFja2VyIGRhdGFiYXNlIHdoZXJlIGl0IGlzIG1vc3QgdXNlZnVs
LgoK

--===============4450620052454294808==
Content-Type: MULTIPART/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; BOUNDARY="8323329-1714636915-1785229815=:490490"
Content-Disposition: inline

--8323329-1714636915-1785229815=:490490
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

URL:=0A  <https://savannah.gnu.org/bugs/?68572>=0A=0A                 Summa=
ry: Load unable to find mat file in subdirectory just=0Aafter save=0A      =
             Group: GNU Octave=0A               Submitter: athibaul=0A     =
          Submitted: Tue 28 Jul 2026 09:10:11 AM UTC=0A                Cate=
gory: Octave Function=0A                Severity: 3 - Normal=0A            =
    Priority: 5 - Normal=0A              Item Group: Unexpected Error or Wa=
rning=0A                  Status: None=0A             Assigned to: None=0A =
        Originator Name: Alexis THIBAULT=0A        Originator Email:=0A    =
         Open/Closed: Open=0A         Discussion Lock: Unlocked=0A         =
        Release: 11.3.0=0A        Operating System: Mac OS=0A           Fix=
ed Release: None=0A         Planned Release: None=0A=0A=0A    _____________=
__________________________________________=0A=0AFollow-up Comments:=0A=0A=
=0A-------------------------------------------------------=0ADate: Tue 28 J=
ul 2026 09:10:11 AM UTC By: Alexis THIBAULT <athibaul>=0AHere's a bug we fo=
und in octave 11.3.0 that involves loading a file soon after=0Acreating it.=
=0AUnder certain conditions, the file cannot be found.=0A=0AThe working dir=
ectory should contain an empty subdirectory subdir/ when=0Alaunching the sc=
ript.=0A=0A=0Afunction bug()=0A  addpath('./subdir');=0A  x =3D 1:10;=0A  s=
ave ('subdir/foo.mat','x');=0A  load foo x   % error: load: unable to find =
file foo=0Aend=0A=0A=0AThis bug does not appear when saving/loading from th=
e current directory=0A=0Afunction fine()=0A  x =3D 1:10;=0A  save ('foo.mat=
','x');=0A  load foo x  % loads fine=0Aend=0A=0A=0AThis issue does not appe=
ar if using 'which' or the interactive debugger, so we=0Asuspect this may b=
e due to an outdated index of some sort.=0A=0Afunction bug()=0A  addpath('.=
/subdir');=0A  x =3D 1:10;=0A  save ('subdir/foo.mat','x');=0A=0A  % The fi=
le is correctly created, and checking for its existence does not=0Aseem to =
influence whether 'load' finds it=0A  exist('subdir/foo.mat','file')=0A=0A =
 % uncommenting any of the following lines results in the file being found=
=0A  % which foo=0A  % keyboard=0A=0A  load foo x=0Aend=0A=0A=0A=0A=0A=0A=
=0A=0A=0A=0A=0A    _______________________________________________________=
=0A=0AReply to this item at:=0A=0A  <https://savannah.gnu.org/bugs/?68572>=
=0A=0A_______________________________________________=0AMessage sent via Sa=
vannah=0Ahttps://savannah.gnu.org/=0A
--8323329-1714636915-1785229815=:490490
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCamhx9wAKCRCqLAuaBUf3
ToE1AP93gKPoWMJeXANRMaFgF+ikgmifab9Tgrtz51bm72oJ4AD/Xqw281szk7zI
Z9sdNVXaBgf1j6JtscVY1f/xbWeP1gg=
=cXRa
-----END PGP SIGNATURE-----

--8323329-1714636915-1785229815=:490490--



--===============4450620052454294808==--