Bug 201087

Summary: Search path seems not to understand "~" properly
Product: [Fedora] Fedora Reporter: Piergiorgio Sartor <piergiorgio.sartor>
Component: octaveAssignee: Quentin Spencer <qspencer>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-17 20:18:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Piergiorgio Sartor 2006-08-02 18:40:11 UTC
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 20:18:35 UTC
This should be fixed in the new 2.9.7-3 release.