[Top][All Lists]

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

[Octave-bug-tracker] [bug #62961] script search path seems not to update

From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #62961] script search path seems not to update to current directory in a script
Date: Sat, 27 Aug 2022 17:17:34 -0400 (EDT)

Update of bug #62961 (project octave):

                  Status:                    None => Confirmed              
                 Release:                   6.4.0 => dev                    
        Operating System:               GNU/Linux => Any                    


Follow-up Comment #1:

Thanks for reporting.

To recreate your problem, I've created the following script from your example
and called it bug62961_cd_oath.m:

cd a; test
cd ../b; test
cd ..

then created two subdirs 'a' and 'b' and I've put a script file 'test.m' with
the following content in 'a':

printf ((from a) "%s\n", pwd);

similiarly for subdir 'b':

printf ((from b) "%s\n", pwd);

and then ran 'bug62961_cd_path.m' from the directory containing 'a' and 'b':

>> bug62961_cd_path
(from a) C:\Users\philip\MyDocs\octave\a
(from a) C:\Users\philip\MyDocs\octave\b

Matlab r2020b gives (after changing 'printf' into 'fprintf' and " -> '):

>> bug62961_cd_path
(from a) C:\Users\philip\MyDocs\octave\a
(from b) C:\Users\philip\MyDocs\octave\b

so there it works as expected. At least, Octave doesn't behave
Matlab-compatible here.

Status -> 'Confirmed'
OS -> Any   (I tried on Windows 10)
Release ->  dev  (I'm using Octave-8.0.0)


Reply to this item at:


Message sent via Savannah

reply via email to

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