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

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

[Octave-bug-tracker] [bug #56267] addpath() on Windows fails to recogniz


From: Rik
Subject: [Octave-bug-tracker] [bug #56267] addpath() on Windows fails to recognize same subdirs with different fileseps and case
Date: Thu, 9 May 2019 13:31:41 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #3, bug #56267 (project octave):

I checked on the code in javaclasspath.m and it is:


for i = 1:numel (varargin)
  clspath = varargin{i};
  if (! ischar (clspath))
    error ("javaaddpath: CLSPATH must be a string");
  endif

  new_path = canonicalize_file_name (tilde_expand (clspath));
  if (isfolder (new_path))
    if (new_path(end) != filesep ())
      new_path = [new_path, filesep()];
    endif
  elseif (! exist (new_path, "file"))
    error ("javaaddpath: CLSPATH does not exist: %s", clspath);
  endif

  success = javaMethod ("addClassPath", "org.octave.ClassHelper", new_path);


So, just as suspected, it calls canonicalize_file_name to make the name
standard before adding it to the path, and that standardization eliminates the
duplicates that differ by file separator.

Does canonicalize_file_name also handle case?

What does this return on Windows?


canonicalize_file_name ('C:\USERS\PHILIP')




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56267>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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