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

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

[Octave-bug-tracker] [bug #57215] editor can't find files in current dir


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #57215] editor can't find files in current dir while "which" is seeing it
Date: Tue, 12 Nov 2019 16:52:12 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Update of bug #57215 (project octave):

                  Status:                    None => In Progress            

    _______________________________________________________

Follow-up Comment #1:

Thanks Philip for opening this report.

>From bug #56267:
"file_in_path" seems to be broken currently on Windows if the first argument
is '.'. 

I used the prefix "\\?\" for "GetFileAttributesW" in kpse.cc (READABLE) to
remove the MAX_PATH limitation [1].
However, this seems to work with absolute paths only and ultimately breaks
"file_in_path".

The following change should fix it:


    diff -r e8e7ec705418 liboctave/util/kpse.cc
    --- a/liboctave/util/kpse.cc        Wed Nov 06 20:07:55 2019 +0100
    +++ b/liboctave/util/kpse.cc        Tue Nov 12 21:58:14 2019 +0100
    @@ -169,7 +169,7 @@
    {
    #if defined (OCTAVE_USE_WINDOWS_API)

    -  std::wstring w_fn = L"\\\\?\\" + octave::sys::u8_to_wstring (fn);
    +  std::wstring w_fn = octave::sys::u8_to_wstring (fn);

       DWORD f_attr = GetFileAttributesW (w_fn.c_str ());


Calling "edit" (or fwiw "file_in_path") with an absolute path still works.

I'm currently cross-building and will push that change if it should work.

[1]:
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfileattributesa

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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