FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16180&edit=1

ID: 16180
Updated by: helgith@gmail.com
Reported By: matt at digg dot com
Summary: File plugin gives incorrect results when directories
are numbers themselves.
Status: Verified
Type: Bug
Package: PEAR_PackageFileManager_Plugins
Operating System: OS X
Package Version: 1.0.0
PHP Version: 5.2.9
-Assigned To:
+Assigned To: dufuz
Roadmap Versions:
New Comment:

-Assigned To:
+Assigned To: dufuz



Previous Comments:
------------------------------------------------------------------------

[2010-02-03 22:29:58] cweiske

Internally, files are indexed with numbers 0, 1, 2 and so on -
directories have their real name in that array.
So using a directory with name "0" or "1" will overwrite the file with
the same *index*. This is an inherent problem in the way the file arrays
are organized internally.
One solution would be to prefix directories with a dash or hash sign.
But that will probably have influence on the whole filemanager package
code...

------------------------------------------------------------------------

[2010-02-03 20:13:17] cweiske

The problem is visible in PEAR_PackageFileManager2::generateContents(),
and in PEAR_PackageFileManager_File::getFileList() - but not in
PEAR_PackageFileManager_File::dirList().

------------------------------------------------------------------------

[2010-02-03 18:30:42] cweiske

-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cweiske


------------------------------------------------------------------------

[2009-05-05 05:24:18] matterk2

Description:
------------
When calling generateContents() on a directory structure which has one
similar to

Package: API_1
Files:
API/1/Disptacher.php
API/1/0/Arg.php
API/1/0/Endpoint.php

With this structure the 'Dispatcher.php' file will never be listed in
the package.xml.

I think it has something to do with the directory itself being an
integer.

This applies to both the Svn and File generators.

------------------------------------------------------------------------

Search Discussions

  • Helgith at Mar 24, 2011 at 11:34 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16180&edit=1

    ID: 16180
    Updated by: helgith@gmail.com
    Reported By: matt at digg dot com
    Summary: File plugin gives incorrect results when directories
    are numbers themselves.
    Status: Verified
    Type: Bug
    Package: PEAR_PackageFileManager_Plugins
    Operating System: OS X
    Package Version: 1.0.0
    PHP Version: 5.2.9
    Assigned To: dufuz
    Roadmap Versions:
    New Comment:

    I'll take a look at this and see how feasible a fix is given how we
    construct the internal
    assoc array.

    I've created a test case for this.


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-03-25 00:36:17] dufuz

    -Assigned To:
    +Assigned To: dufuz


    ------------------------------------------------------------------------

    [2010-02-03 22:29:58] cweiske

    Internally, files are indexed with numbers 0, 1, 2 and so on -
    directories have their real name in that array.
    So using a directory with name "0" or "1" will overwrite the file with
    the same *index*. This is an inherent problem in the way the file arrays
    are organized internally.
    One solution would be to prefix directories with a dash or hash sign.
    But that will probably have influence on the whole filemanager package
    code...

    ------------------------------------------------------------------------

    [2010-02-03 20:13:17] cweiske

    The problem is visible in PEAR_PackageFileManager2::generateContents(),
    and in PEAR_PackageFileManager_File::getFileList() - but not in
    PEAR_PackageFileManager_File::dirList().

    ------------------------------------------------------------------------

    [2010-02-03 18:30:42] cweiske

    -Status: Open
    +Status: Verified
    -Assigned To:
    +Assigned To: cweiske


    ------------------------------------------------------------------------

    [2009-05-05 05:24:18] matterk2

    Description:
    ------------
    When calling generateContents() on a directory structure which has one
    similar to

    Package: API_1
    Files:
    API/1/Disptacher.php
    API/1/0/Arg.php
    API/1/0/Endpoint.php

    With this structure the 'Dispatcher.php' file will never be listed in
    the package.xml.

    I think it has something to do with the directory itself being an
    integer.

    This applies to both the Svn and File generators.

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 24, '11 at 11:33p
activeMar 24, '11 at 11:34p
posts2
users1
websitepear.php.net

1 user in discussion

Helgith: 2 posts

People

Translate

site design / logo © 2022 Grokbase