Enlightenment CVS committal Author : chaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/bin Modified Files: evfs_operation.c evfs_operation_tasks.c Log Message: * Be more error-cautious =================================================================== RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_operation.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- evfs_operation.c 7 Aug 2006 16:31:28 -0000 1.14 +++ evfs_operation.c 14 Aug 2006 11:33:07 -0000 1.15 @@ -232,7 +232,7 @@ break; } - if (op->status == EVFS_OPERATION_STATUS_COMPLETED) { + if (op->status == EVFS_OPERATION_STATUS_COMPLETED || op->status == EVFS_OPERATION_STATUS_ERROR ) { ecore_list_remove_first(evfs_operation_queue); evfs_operation_destroy(op); @@ -387,6 +387,12 @@ printf("Can't process task - unknown type!\n"); break; + } + + /*TODO: Should we prompt user here? */ + if (task->status == EVFS_OPERATION_TASK_STATUS_ERROR) { + op->status = EVFS_OPERATION_STATUS_ERROR; + return; } OPERATION_TASK_EXIT: =================================================================== RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_operation_tasks.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- evfs_operation_tasks.c 14 Aug 2006 11:07:48 -0000 1.10 +++ evfs_operation_tasks.c 14 Aug 2006 11:33:07 -0000 1.11 @@ -55,7 +55,8 @@ /*printf("Opening source file...\n");*/ int fd =(*EVFS_PLUGIN_FILE(copy->file_from->plugin)->functions->evfs_file_open) (op->client, copy->file_from); if (!fd) { - /*TODO: Error checking on file open fail*/ + EVFS_OPERATION_TASK(copy)->status = EVFS_OPERATION_TASK_STATUS_ERROR; + goto ERROR; } } @@ -95,6 +96,9 @@ if (b_read == 0) { printf("File copy error - read 0 bytes\n"); copy->next_byte = copy->source_stat.st_size; + + EVFS_OPERATION_TASK(copy)->status = EVFS_OPERATION_TASK_STATUS_ERROR; + goto ERROR; } @@ -103,6 +107,8 @@ } else { printf("Destination File create error\n"); copy->next_byte = copy->source_stat.st_size; + EVFS_OPERATION_TASK(copy)->status = EVFS_OPERATION_TASK_STATUS_ERROR; + goto ERROR; } /*printf("Ending task, continuing operation...\n");*/ @@ -115,6 +121,7 @@ EVFS_OPERATION_TASK(copy)->status = EVFS_OPERATION_TASK_STATUS_COMMITTED; } + ERROR: return total; } ------------------------------------------------------------------------- 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