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

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

[Octave-bug-tracker] [bug #59706] Add function that normalizes a file pa


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #59706] Add function that normalizes a file path
Date: Thu, 17 Dec 2020 12:11:32 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.60

Update of bug #59706 (project octave):

                Severity:              3 - Normal => 1 - Wish               
                Priority:              5 - Normal => 3 - Low                
              Item Group:             Performance => Feature Request        
                 Release:                   6.1.0 => dev                    
        Operating System:       Microsoft Windows => Any                    
                 Summary: canonicalize_file_name performance in Windows => Add
function that normalizes a file path

    _______________________________________________________

Follow-up Comment #1:

`canonicalize_file_name` in Octave is designed to do essentially the same as
the Linux function of the same name:
https://man7.org/linux/man-pages/man3/canonicalize_file_name.3.html

Among other things, it must resolve symbolic links. For this to work as
expected it *has* to access the file system (which might be slow).

IIUC, you are proposing to add a new function that normalizes a file path
(without actually checking the file system layout).

When Octave starts to adopt C++17, this could be realized with
`std::filesystem::path::lexically_normal`:
https://en.cppreference.com/w/cpp/filesystem/path/lexically_normal

If that function should be added, it might be possible to replace *some* uses
of `canonicalize_file_name` with that new function.

Fwiw, the slow down discussed in bug #57439 no longer occurs and that report
has been closed as fixed.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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