Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/plugins


Modified Files:
        evfs_fs_tar.c 


Log Message:
TAR directory listing works

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_tar.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evfs_fs_tar.c       26 Oct 2005 11:33:31 -0000      1.3
+++ evfs_fs_tar.c       26 Oct 2005 12:13:10 -0000      1.4
@@ -244,6 +244,7 @@
        struct tar_file* file;
        struct tar_element* ele, *ele_new;
        Ecore_List* keys;
+       Ecore_List* files = ecore_list_new();
        char* key;
        
        printf("Listing tar file dir: '%s'\n", 
com->file_command.files[0]->path);
@@ -257,8 +258,16 @@
 
                keys = ecore_hash_keys(file->hierarchy);
                while ( (key = ecore_list_next(keys))) {
+                       evfs_filereference* reference = NEW(evfs_filereference);
+                       int size=0;
                        ele = ecore_hash_get(file->hierarchy, key);
+
+                       
                        printf("Filename: '%s/%s'\n", ele->path, ele->name);
+                       size = 
strlen(ele->path)+strlen("/")+strlen(ele->name)+1;
+                       reference->path = malloc(size);
+                       snprintf(reference->path, size, "%s/%s", ele->path, 
ele->name);
+                       ecore_list_append(files, reference);
                        
                }
        } else {
@@ -269,10 +278,21 @@
                        keys = ecore_hash_keys(ele->children);
                        ecore_list_goto_first(keys);
                        while ( (key = ecore_list_next(keys))) {
+                               evfs_filereference* reference = 
NEW(evfs_filereference);
+                               int size=0;
+
                                ele_new = ecore_hash_get(ele->children, key);
-                               printf ("Filename: '%s:%s'\n", ele_new->path, 
ele_new->name);
+                               
+
+                               size = 
strlen(ele_new->path)+strlen("/")+strlen(ele_new->name)+1;
+                               reference->path = malloc(size);
+                               snprintf(reference->path, size, "%s/%s", 
ele_new->path, ele_new->name);
+                               ecore_list_append(files, reference);
                        }
                }
        }
 
+
+       evfs_list_dir_event_create(client, com, files);
+
 }




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to