bugGNU Octave - Bugs: bug #51268, addpath fails for UNC paths on...

 
 

bug #51268: addpath fails for UNC paths on Windows

Submitter:  None
Submitted:  Mon 19 Jun 2017 04:26:59 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Andy Buckle Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 18 Dec 2017 05:17:00 PM UTC, comment #6: 

Probably not a bad idea since this is a true bug, rather than a new feature.  I used 'hg graft' to backport the cset to stable here (http://hg.savannah.gnu.org/hgweb/octave/rev/ceae837bc9ea).

Rik <rik5>
Group administrator
Mon 18 Dec 2017 04:36:40 AM UTC, comment #5: 

What about pushing this fix to the stable branch also, so it will enter 4.2.2 release?

Avinoam Kalma <avinoam>
Group Member
Tue 29 Aug 2017 06:51:13 PM UTC, comment #4: 

Markus:  I pushed your changeset here:

http://hg.savannah.gnu.org/hgweb/octave/rev/37f3c4416f2e

Note that I used OCTAVE_HAVE_WINDOWS_FILESYSTEM instead of OCTAVE_USE_WINDOWS_API since this code is specific to the Windows filesystem but doesn't actually use any of Windows-specific functions.

John W. Eaton <jwe>
Group administrator
Sun 25 Jun 2017 04:52:47 PM UTC, comment #3: 

The attached patch fixes the issue with adding UNC paths on Windows for me.

(file #41042)

Markus Mützel <mmuetzel>
Group administrator
Wed 21 Jun 2017 01:40:39 PM UTC, comment #2: 

The problem is probably with the following lines in load-path.cc (around line 2420) introduces with http://hg.savannah.gnu.org/hgweb/octave/rev/d5a58720459d

          // Remove duplicate directory separators
          dir.erase (std::unique (dir.begin (), dir.end (),
                                  [](char l, char r)
                                  {
                                    return l == r &&
                                           octave::sys::file_ops::is_dir_sep (l);
                                  }),
                     dir.end ());


How could that be adapted to allow the string to start with two directory separators (on Windows)?

For the time being you could map the network share to a drive letter and add the folder to the path from there.

Markus Mützel <mmuetzel>
Group administrator
Tue 20 Jun 2017 09:22:07 AM UTC, comment #1: 

This bug is still present in a recent dev build on Windows 10.

Markus Mützel <mmuetzel>
Group administrator
Mon 19 Jun 2017 04:26:59 PM UTC, original submission:  


addpath('\\server\some\share')


fails with


warning: addpath: \server\some\share: No such file or directory


(Note leading '\' stripped)

This used to work on Octave 3.6.4

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #41042:  bug51268_addpath_UNC.patch added by mmuetzel (1KiB - application/octet-stream)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-05 mmuetzel Dependencies- bugs #53070 is dependent
    2017-09-05 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2017-08-29 jwe StatusPatch Submitted Ready For Test
    2017-06-25 mmuetzel Attached File- Added bug51268_addpath_UNC.patch, #41042
        StatusConfirmed Patch Submitted
    2017-06-20 mmuetzel StatusNone Confirmed
        Release4.2.1 dev
        Summaryaddpath fails for UNC paths on Win 7 addpath fails for UNC paths on Windows

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code