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

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

[Octave-bug-tracker] [bug #62576] dir() behavior changed in octave 7.1.0


From: Carlos Fuentes
Subject: [Octave-bug-tracker] [bug #62576] dir() behavior changed in octave 7.1.0 for network drives
Date: Fri, 3 Jun 2022 11:51:15 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?62576>

                 Summary: dir() behavior changed in octave 7.1.0 for network
drives
                 Project: GNU Octave
               Submitter: fito
               Submitted: Fri 03 Jun 2022 03:51:13 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: dir
        Originator Email: 
             Open/Closed: Open
                 Release: 7.1.0
         Discussion Lock: Any
        Operating System: Microsoft Windows


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 03 Jun 2022 03:51:13 PM UTC By: Carlos Fuentes <fito>
Hello, 

I am reporting a bug, as I noticed the behavior of dir() changed from 6.4.0 to
7.1.0. Lets say we have a network drive called '\\The_network_drive\' mounted
in 'Z:\'. And there is one folder in it, called 'The_folder' (Z:\The_folder),
which has one file 'The_file.txt'.

In 6.4.0, if we are standing in 'Z:\' and we write:

+Verbatim+
>> a = dir();
>> b = dir([a(3).folder '\' a(3).name]);

b =

 3x1 struct array containing the fields:

    name
    folder
    date
    bytes
    isdir
    datenum
    statinfo

-Verbatim-

we will get the contents of 'The_folder' in b, in a structure ('.',
'..','The_file.txt') 

However, in 7.1.0, if we do the same, it does not work. Because in 7.1.0,
a(3).folder is not 'Z:\', but '\\the_network_drive\', and when doing b =
dir('\\the_network_drive\The folder'), dir returns an empty structure.

+Verbatim+

>> a = dir();
>> b = dir([a(3).folder '\' a(3).name]);

b =

 0x1 struct array containing the fields:

    name
    folder
    date
    bytes
    isdir
    datenum
    statinfo

+Verbatim+

Following this logic, any recursive element or "folder crawler" we want to
write based on dir() that works with network drives will have the issue of not
being able to reference its absolute address correctly, or more specific, in a
useful way.

Thank you for reading and considering the issue.

Running on Windows 10 21H2, with installer versions (x64) of both octave 6.4.0
and 7.1.0







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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