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

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

[Octave-bug-tracker] [bug #45816] canonicalize_file_name() changed behav


From: anonymous
Subject: [Octave-bug-tracker] [bug #45816] canonicalize_file_name() changed behavoir between 3.8.2 and 4.0.0 on windows
Date: Mon, 24 Aug 2015 19:08:43 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0

URL:
  <http://savannah.gnu.org/bugs/?45816>

                 Summary: canonicalize_file_name() changed behavoir between
3.8.2 and 4.0.0 on windows
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mo 24 Aug 2015 19:08:42 UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Preface: I don't know what the correct behavoir is, but since there are users
relying on the old behavoir (e.g.: #45813
<http://savannah.gnu.org/bugs/?45813>), I submitted this report here.

There has already been atleast one other bugs due to this change, but it got
solved by moving away from canonicalize_file_name() to
make_absolute_filename() (bug #43979 <http://savannah.gnu.org/bugs/?43979>

In short, the 3.8.2 version returned strictly backslashed paths on windows
while the 4.0.0 version might mix slashes and backslashes depending on the
source of the path fragment. Users (falsely?) relying on only having native
path separators will fail with 4.0.0

system: Win7-64

3.8.2 (MXE build)

>> cd D:\folderA\folderB\

>> file="file_a.txt"
file = file_a.txt
>> canonicalize_file_name (file)
ans = D:\folderA\folderB\file_a.txt

>> cd ..

>> file="folderB\\file_a.txt"
file = folderB\file_a.txt
>> canonicalize_file_name (file)
ans = D:\folderA\folderB\file_a.txt

>> file="folderB/file_a.txt"
file = folderB/file_a.txt
>> canonicalize_file_name (file)
ans = D:\folderA\folderB\file_a.txt


4.0.0 (official build)

>> cd D:\folderA\folderB\

>> file="file_a.txt"
file = file_a.txt
>> canonicalize_file_name (file)
ans = D:\folderA\folderB/file_a.txt

>> cd ..

>> file="folderB\\file_a.txt"
file = folderB\file_a.txt
>> canonicalize_file_name (file)
ans = D:\folderA/folderB/file_a.txt

>> file="folderB/file_a.txt"
file = folderB/file_a.txt
>> canonicalize_file_name (file)
ans = D:\folderA/folderB/file_a.txt





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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