From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,dd794611c94e9169,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.84.MISMATCH!xlned.com!feeder1.xlned.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!open-news-network.org!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Ada.Directories and network shares Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH Date: Sat, 17 Jul 2010 12:43:15 +0200 Message-ID: <1ba1dga9eoydh.10v0tx3bl9yxw$.dlg@40tude.net> NNTP-Posting-Date: 17 Jul 2010 12:43:16 CEST NNTP-Posting-Host: c44b616c.newsspool4.arcor-online.net X-Trace: DXC=R_M\2cOI^>0gP]QSEBQ^d44IUK[ It seems that Ada.Directories is broken. Neither under Fedora or Debian the following can walk a network share (cifs). The following does not work with mounted shares: with Ada.Directories; use Ada.Directories; with Ada.Text_IO; procedure Test_Directory_Walk is procedure Walk (Name : String; Pattern : String) is procedure Print (Item : Directory_Entry_Type) is begin Ada.Text_IO.Put_Line (Full_Name (Item)); end Print; procedure Walk (Item : Directory_Entry_Type) is begin if Simple_Name (Item) /= "." and then Simple_Name (Item) /= ".." then Walk (Full_Name (Item), Pattern); end if; exception when Name_Error => null; end Walk; begin Search (Name, Pattern, (others => True), Print'Access); Search (Name, "*", (Directory => True, others => False), Walk'Access); end Walk; begin Walk (".", "*"); end Test_Directory_Walk; When starting at the directory containing the mounting point, the result is that the mounting point is not printed at all. When cd at the mounting point and starting it there, then the result is: raised ADA.IO_EXCEPTIONS.NAME_ERROR : unknown directory "" P.S. GNAT GPL 2010 seem to work, but I have a suspicion that it has some issues as well. I didn't figured yet when and which. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de