Bug 201087 - Search path seems not to understand "~" properly
Summary: Search path seems not to understand "~" properly
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: octave
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Quentin Spencer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-02 18:40 UTC by Piergiorgio Sartor
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-17 20:18:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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