Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/plugins


Modified Files:
        evfs_fs_posix.c evfs_fs_samba.c 


Log Message:
Various cleanups

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_posix.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evfs_fs_posix.c     22 Oct 2005 09:09:55 -0000      1.16
+++ evfs_fs_posix.c     23 Oct 2005 12:55:59 -0000      1.17
@@ -129,6 +129,9 @@
                        type = EVFS_FILE_EV_CREATE;
                        /*printf("File created - '%s'\n", path);*/
                        break;
+               case ECORE_FILE_EVENT_DELETED_FILE:
+                       type = EVFS_FILE_EV_REMOVE;
+                       break;
        }
 
        /*Looking for ppl no notify*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_samba.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evfs_fs_samba.c     22 Oct 2005 09:09:55 -0000      1.13
+++ evfs_fs_samba.c     23 Oct 2005 12:55:59 -0000      1.14
@@ -86,7 +86,7 @@
        ecore_list_goto_first(cache);
        while ( (obj = ecore_list_next(cache))) {
                if (!strncmp(obj->path, path, strlen(path))) {
-                       printf("Found match for path in cache: '%s':'%s'\n", 
obj->username, obj->password);
+                       printf("Found match for path in cache: user '%s'\n", 
obj->username);
                        return obj;
                }
        }
@@ -235,34 +235,36 @@
        printf("evfs_fs_samba: Listing directory %s\n", dir_path);
 
 
-       dir = smb_context->opendir(smb_context,dir_path);
+       if ( (dir = smb_context->opendir(smb_context,dir_path)) >=0 ) {
 
-       while (entry = smb_context->readdir(smb_context, dir) ) {
+               while (entry = smb_context->readdir(smb_context, dir) ) {
                
-            /*Make sure we don't use . or ..*/
-          if (strcmp(entry->name, ".") && strcmp(entry->name, "..")) { 
-               evfs_filereference* reference = NEW(evfs_filereference);
-
-               if (entry->smbc_type == SMBC_FILE) reference->file_type = 
EVFS_FILE_NORMAL;
-               else if (entry->smbc_type == SMBC_DIR) reference->file_type = 
EVFS_FILE_DIRECTORY; 
-
-               size = 
-                         (sizeof(char) * 
strlen(command->file_command.files[0]->path)) + 
-                         (sizeof(char) * strlen(entry->name )) + 
-                         (sizeof(char) * 2 );
-               reference->path = malloc(size);
-               snprintf(reference->path, size, "%s/%s", 
command->file_command.files[0]->path, entry->name );
-       
-               printf("File '%s' is of type '%d'\n", reference->path, 
reference->file_type);
-               
-               
-               ecore_list_append(files, reference);
-          }
+                    /*Make sure we don't use . or ..*/
+                  if (strcmp(entry->name, ".") && strcmp(entry->name, "..")) { 
+                       evfs_filereference* reference = NEW(evfs_filereference);
+       
+                       if (entry->smbc_type == SMBC_FILE) reference->file_type 
= EVFS_FILE_NORMAL;
+                       else if (entry->smbc_type == SMBC_DIR) 
reference->file_type = EVFS_FILE_DIRECTORY; 
+
+                       size = 
+                                 (sizeof(char) * 
strlen(command->file_command.files[0]->path)) + 
+                                 (sizeof(char) * strlen(entry->name )) + 
+                                 (sizeof(char) * 2 );
+                       reference->path = malloc(size);
+                       snprintf(reference->path, size, "%s/%s", 
command->file_command.files[0]->path, entry->name );
                
+                       printf("File '%s' is of type '%d'\n", reference->path, 
reference->file_type);
+                                       
+                       ecore_list_append(files, reference);
+                  }
+               }
+               smb_context->closedir(smb_context,dir);
+               evfs_list_dir_event_create(client, command, files);
+       } else {
+                   printf("Could not open [%s] (%d:%s)\n",dir_path, errno, 
strerror(errno));
        }
-       smb_context->closedir(smb_context,dir);
        
-       evfs_list_dir_event_create(client, command, 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