Bug 201087 - Search path seems not to understand "~" properly
Search path seems not to understand "~" properly
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: octave (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Quentin Spencer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-02 14:40 EDT by Piergiorgio Sartor
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-17 16:18:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Piergiorgio Sartor 2006-08-02 14:40:11 EDT
Description of problem:
Adding some local library, relative to $HOME, with the new method:

addpath(genpath("~/octave"));

results in unusable libraries/functions under $HOME/octave

Version-Release number of selected component (if applicable):
2.9.7-1.fc5

How reproducible:
Always.

Steps to Reproduce:
1.
Create a directory, i.e $HOME/octave/libs

2.
Put a function, as .m file, in "libs", for example "test.m":

function answer = test( n )

    answer = 1;

    for i = 2:n
        answer = answer * i;
    endfor

endfunction

3.
Start octave and add the path with:

addpath(genpath("~/octave"));

4.
Try tu execute "test(4)" (or any other number).

Actual results:
error: no such file, `/home/user/~/octave/libs/test.m'
error: `test' undefined near line 2 column 1

Expected results:
ans =  24

Additional info:
Using the full path "/home/user/octave" works fine.
It seems the "~" is expanded, but somehow not removed, thus
interfering with the execution.
Comment 1 Quentin Spencer 2006-08-17 16:18:35 EDT
This should be fixed in the new 2.9.7-3 release.

Note You need to log in before you can comment on or make changes to this bug.