Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/plugins/vfolder


Modified Files:
        evfs_vfolder_trash.c 


Log Message:
* Actually write the trash files

===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/vfolder/evfs_vfolder_trash.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evfs_vfolder_trash.c        14 Aug 2006 21:45:52 -0000      1.3
+++ evfs_vfolder_trash.c        15 Aug 2006 08:22:56 -0000      1.4
@@ -78,16 +78,33 @@
        while ( (file = ecore_list_remove_first(info_files))) {
                Ecore_Hash* trash;
                evfs_filereference* ref;
+               char* pos;
                
                snprintf(parser, PATH_MAX, "%s/%s", evfs_trash_home, file);
                Ecore_Desktop* desk = ecore_desktop_get(parser, NULL);
-               
-               snprintf(parser, PATH_MAX, "trash:///#file://%s", desk->path);
-               printf("Parsing %s\n", parser);
-               ref = evfs_parse_uri_single(parser);
 
-               if (ref) 
-                       ecore_list_append(*list, ref);
+               if (desk->path) {
+                       pos = strrchr(desk->path, '/');
+                       if (pos ) {
+               
+                               /*First check if this is a complete uri path in 
.info*/
+                               /*We need to find someway to reference the 
.info file we're talking
+                                * about - Note the following section is 
redundant for now*/
+                               if (!(ref = evfs_parse_uri_single(desk->path))) 
{
+                                       snprintf(parser, PATH_MAX, 
"trash:///%s", pos+1);
+                                       printf("Parsing %s\n", parser);
+                                       ref = evfs_parse_uri_single(parser);
+                               } else {
+                                       evfs_cleanup_filereference(ref);
+                                       snprintf(parser, PATH_MAX, 
"trash:///%s", pos+1);
+                                       printf("Parsing %s\n", parser);
+                                       ref = evfs_parse_uri_single(parser);    
                
+                               }
+               
+                               if (ref) 
+                                       ecore_list_append(*list, ref);
+                       }
+               }
                
        }
 }



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to