PerlAlien / File-Listing

Module to parse directoy listings
1 stars 3 forks source link

File::Listing::dosftp and 24-hour times [rt.cpan.org #73730] #9

Open plicease opened 4 years ago

plicease commented 4 years ago

https://rt.cpan.org/Ticket/Display.html?id=73730

Hallo,

 File::Listing::dosftp could not handle 24-hour times, e.g. in '23.02.2011 
 17:10    <DIR>          Documents'.

You have to change
         /^(\d\d-\d\d-\d\d\s+\d\d:\d\d\wM)   # Date and time info
         \s+                                      # Some space
         (<\w{3}>|\d+)                            # Dir or Size
         \s+                                      # Some more space
         (.+)$                                    # File name
        /x
to
/^(\d\d-\d\d-\d\d\s+\d\d:\d\d[\w]?[M]?)   # Date and time info
         \s+                                      # Some space
         (<\w{3}>|\d+)                            # Dir or Size
         \s+                                      # Some more space
         (.+)$                                    # File name
        /x

Mit freundlichen Grüßen / Kind regards

i.A.
Manfred Lauer

**********************************************
Manfred Lauer
Information Services

Tel    +49.6304.74-426
Fax   +49.6304-74-1426

manfred.lauer@kob.de
www.kob.de
**********************************************
File::Listing::dosftp  (GAAS/File-Listing-6.03.tar.gz)

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\mlauer.WOLFSTEIN>perl -v

This is perl 5, version 12, subversion 2 (v5.12.2) built for 
MSWin32-x86-multi-thread

Copyright 1987-2010, Larry Wall

Perl may be copied only under the terms of either the Artistic License or 
the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

C:\Users\mlauer.WOLFSTEIN>

****************************************************************************
KARL OTTO BRAUN GmbH & Co. KG
Lauterstraße 50
67752 Wolfstein
Postfach 1140
67751 Wolfstein
Deutschland/Germany

HRA 21123 Amtsgericht Kaiserslautern 
Persönlich haftender Gesellschafter: Hans Braun GmbH Wolfstein
HRB 21019 Amtsgericht Kaiserslautern
Geschäftsführer: Dr. Gerhard F. Braun 
******************************************************************************
plicease commented 4 years ago

The previous maintainer commented:

It would not parse your sample date (23.02.2011) with that regexp.