octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #33862] Test of sysdep.cc fail on dev. source


From: Rik
Subject: [Octave-bug-tracker] [bug #33862] Test of sysdep.cc fail on dev. source (MinGW)
Date: Thu, 06 Oct 2011 23:10:38 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0

Follow-up Comment #4, bug #33862 (project octave):

I think the issue may lie in liboctave/file-ops.cc in function
tilde_expand_word.  The excerpt below is at line 220.


  // A leading `~/' or a bare `~' is *always* translated to the value
  // of $HOME or the home directory of the current user, regardless of
  // any preexpansion hook.

  if (f_len == 1 || file_ops::is_dir_sep (filename[1]))
    return octave_env::get_home_directory () + filename.substr (1);


So it looks like "~/foobar" is immediately parsed as "~" and filename.substr
(1) is "/foobar".  Thus, no file separator is ever inserted.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33862>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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