0.08: support for filenames which are null (it will ne named NULL-id)
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 26 Apr 2005 20:12:55 +0000 (20:12 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 26 Apr 2005 20:12:55 +0000 (20:12 +0000)
git-svn-id: svn://svn.rot13.org/fuse_dbi/trunk@55 17f4e80c-d0e0-0310-8903-bfc3ae804c12

DBI.pm

diff --git a/DBI.pm b/DBI.pm
index 7c07132..89889bd 100755 (executable)
--- a/DBI.pm
+++ b/DBI.pm
@@ -12,7 +12,7 @@ use DBI;
 use Carp;
 use Data::Dumper;
 
-our $VERSION = '0.07';
+our $VERSION = '0.08';
 
 # block size for this filesystem
 use constant BLOCK => 1024;
@@ -329,12 +329,14 @@ sub read_filenames {
 
        # read them in with sesible defaults
        while (my $row = $sth->{'filenames'}->fetchrow_hashref() ) {
+               $row->{'filename'} ||= 'NULL-'.$row->{'id'};
                $files{$row->{'filename'}} = {
                        size => $row->{'size'},
                        mode => $row->{'writable'} ? 0644 : 0444,
                        id => $row->{'id'} || 99,
                };
 
+
                my $d;
                foreach (split(m!/!, $row->{'filename'})) {
                        # first, entry is assumed to be file