Fix file importing code to not generate some duplicate directories
authorDan Winship <danw@gnome.org>
Wed, 20 Feb 2008 17:37:37 +0000 (12:37 -0500)
committerDan Winship <danw@gnome.org>
Wed, 20 Feb 2008 17:42:42 +0000 (12:42 -0500)
commit572a0837d6ea8ebb03ac412572bbeec294b5f1d5
treeaaf76088deaa41c19b41f758ef99d1135c4d11e8
parentbaea143ed10998fbace2d2b98b7a9c442938aee5
Fix file importing code to not generate some duplicate directories

build_file_tree() depends on the fact that the contents of a directory
are sorted immediately after it in the file list, but '.' sorts before '/'
lexicographically, so you'd actually end up with, eg:

    /etc/yum
    /etc/yum.conf
    /etc/yum/pluginconf.d

which would cause a second entry for /etc/yum to be added to the file
list.

For now I've fixed this by make compare_filenames() do a special strcmp
by hand, manually sorting '/' before anything else.
razor.c