Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/bin


Modified Files:
        evfs_server_handle.c 
Added Files:
        evfs_operation.c 


Log Message:
* Make rename work

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/bin/evfs_server_handle.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- evfs_server_handle.c        15 Jan 2006 09:21:59 -0000      1.34
+++ evfs_server_handle.c        18 Jan 2006 10:31:21 -0000      1.35
@@ -165,7 +165,14 @@
        evfs_plugin* plugin = evfs_get_plugin_for_uri(client->server, 
command->file_command.files[0]->plugin_uri);
        if (plugin) {
                printf("Pointer here: %p\n", 
plugin->functions->evfs_file_rename);
-               (*plugin->functions->evfs_file_rename)(client,command);
+               
+               if (plugin->functions->evfs_file_rename)  {
+                       if (command->file_command.num_files == 2) 
+                               
(*plugin->functions->evfs_file_rename)(client,command);
+                       else
+                               printf("ERR: Wrong number of files to 
rename\n");
+               } else
+                       printf("Rename not supported\n");
        }
 }
 
@@ -251,6 +258,13 @@
 
 }
 
+
+/* TODO:
+ * 1. check if file exists before open/write.  if so, wait-and-lock for user
+ *    choice
+ * 2. in main loop, if file read bytes < expected, delete file, and retry a 
+ *    preset number of times, before error.
+ */ 
 void evfs_handle_file_copy(evfs_client* client, evfs_command* command, 
evfs_command* root_command) {
        evfs_plugin* plugin;
        evfs_plugin* dst_plugin;
@@ -299,7 +313,8 @@
                                (file_stat.st_size > count + COPY_BLOCKSIZE) ? 
COPY_BLOCKSIZE : (file_stat.st_size - count);
                                
                                //printf("Reading/writing %d bytes\n", 
read_write_bytes);
-                       
+               
+                               //TODO: Implement error checking here
                                b_read = 
                                
(*plugin->functions->evfs_file_read)(client,command->file_command.files[0], 
bytes, read_write_bytes );
                                if (b_read > 0) {




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to