summaryrefslogtreecommitdiff
path: root/legacy/eio
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@profusion.mobi>2012-06-21 13:56:42 +0000
committerLeandro Pereira <leandro@profusion.mobi>2012-06-21 13:56:42 +0000
commitd625e4d386e1a87650a9b4804ca53b1db76a6f4b (patch)
tree26c6d7a1c8900fd9ab9395662866948e01469caf /legacy/eio
parente15ba8bba18b0622c6bc7f91be5205973084326a (diff)
Reverting r72552.
SVN revision: 72607
Diffstat (limited to 'legacy/eio')
-rw-r--r--legacy/eio/src/lib/eio_dir.c1
-rw-r--r--legacy/eio/src/lib/eio_single.c51
2 files changed, 18 insertions, 34 deletions
diff --git a/legacy/eio/src/lib/eio_dir.c b/legacy/eio/src/lib/eio_dir.c
index c71864dcfe..40d2b6a670 100644
--- a/legacy/eio/src/lib/eio_dir.c
+++ b/legacy/eio/src/lib/eio_dir.c
@@ -313,7 +313,6 @@ _eio_dir_chmod(Ecore_Thread *thread, Eio_Dir_Copy *order,
313 { 313 {
314 /* destroy in reverse order so that we don't prevent change of lower dir */ 314 /* destroy in reverse order so that we don't prevent change of lower dir */
315 dir = eina_list_data_get(eina_list_last(order->dirs)); 315 dir = eina_list_data_get(eina_list_last(order->dirs));
316 if (!dir) continue;
317 order->dirs = eina_list_remove_list(order->dirs, eina_list_last(order->dirs)); 316 order->dirs = eina_list_remove_list(order->dirs, eina_list_last(order->dirs));
318 317
319 /* build target dir path */ 318 /* build target dir path */
diff --git a/legacy/eio/src/lib/eio_single.c b/legacy/eio/src/lib/eio_single.c
index fafeda5657..4c2b240a35 100644
--- a/legacy/eio/src/lib/eio_single.c
+++ b/legacy/eio/src/lib/eio_single.c
@@ -414,18 +414,16 @@ eio_file_direct_stat(const char *path,
414 s->path = eina_stringshare_add(path); 414 s->path = eina_stringshare_add(path);
415 s->done_cb = done_cb; 415 s->done_cb = done_cb;
416 416
417 if (eio_file_set(&s->common, 417 if (!eio_file_set(&s->common,
418 NULL, 418 NULL,
419 error_cb, 419 error_cb,
420 data, 420 data,
421 _eio_file_stat, 421 _eio_file_stat,
422 _eio_file_stat_done, 422 _eio_file_stat_done,
423 _eio_file_stat_error)) 423 _eio_file_stat_error))
424 return &s->common; 424 return NULL;
425 425
426 eina_stringshare_del(path); 426 return &s->common;
427 free(s);
428 return NULL;
429} 427}
430 428
431EAPI Eio_File * 429EAPI Eio_File *
@@ -446,18 +444,16 @@ eio_file_direct_lstat(const char *path,
446 s->path = eina_stringshare_add(path); 444 s->path = eina_stringshare_add(path);
447 s->done_cb = done_cb; 445 s->done_cb = done_cb;
448 446
449 if (eio_file_set(&s->common, 447 if (!eio_file_set(&s->common,
450 NULL, 448 NULL,
451 error_cb, 449 error_cb,
452 data, 450 data,
453 _eio_file_lstat, 451 _eio_file_lstat,
454 _eio_file_stat_done, 452 _eio_file_stat_done,
455 _eio_file_stat_error)) 453 _eio_file_stat_error))
456 return &s->common; 454 return NULL;
457 455
458 eina_stringshare_del(path); 456 return &s->common;
459 free(s);
460 return NULL;
461#else 457#else
462 return eio_file_direct_stat(path, done_cb, error_cb, data); 458 return eio_file_direct_stat(path, done_cb, error_cb, data);
463#endif 459#endif
@@ -479,18 +475,16 @@ eio_file_unlink(const char *path,
479 475
480 l->path = eina_stringshare_add(path); 476 l->path = eina_stringshare_add(path);
481 477
482 if (eio_file_set(&l->common, 478 if (!eio_file_set(&l->common,
483 done_cb, 479 done_cb,
484 error_cb, 480 error_cb,
485 data, 481 data,
486 _eio_file_unlink, 482 _eio_file_unlink,
487 _eio_file_unlink_done, 483 _eio_file_unlink_done,
488 _eio_file_unlink_error)) 484 _eio_file_unlink_error))
489 return &l->common; 485 return NULL;
490 486
491 eina_stringshare_del(path); 487 return &l->common;
492 free(l);
493 return NULL;
494} 488}
495 489
496EAPI Eio_File * 490EAPI Eio_File *
@@ -511,18 +505,16 @@ eio_file_mkdir(const char *path,
511 r->path = eina_stringshare_add(path); 505 r->path = eina_stringshare_add(path);
512 r->mode = mode; 506 r->mode = mode;
513 507
514 if (eio_file_set(&r->common, 508 if (!eio_file_set(&r->common,
515 done_cb, 509 done_cb,
516 error_cb, 510 error_cb,
517 data, 511 data,
518 _eio_file_mkdir, 512 _eio_file_mkdir,
519 _eio_file_mkdir_done, 513 _eio_file_mkdir_done,
520 _eio_file_mkdir_error)) 514 _eio_file_mkdir_error))
521 return &r->common; 515 return NULL;
522 516
523 eina_stringshare_del(path); 517 return &r->common;
524 free(r);
525 return NULL;
526} 518}
527 519
528EAPI Eio_File * 520EAPI Eio_File *
@@ -543,18 +535,16 @@ eio_file_chmod(const char *path,
543 r->path = eina_stringshare_add(path); 535 r->path = eina_stringshare_add(path);
544 r->mode = mode; 536 r->mode = mode;
545 537
546 if (eio_file_set(&r->common, 538 if (!eio_file_set(&r->common,
547 done_cb, 539 done_cb,
548 error_cb, 540 error_cb,
549 data, 541 data,
550 _eio_file_chmod, 542 _eio_file_chmod,
551 _eio_file_mkdir_done, 543 _eio_file_mkdir_done,
552 _eio_file_mkdir_error)) 544 _eio_file_mkdir_error))
553 return &r->common; 545 return NULL;
554 546
555 eina_stringshare_del(path); 547 return &r->common;
556 free(r);
557 return NULL;
558} 548}
559 549
560EAPI Eio_File * 550EAPI Eio_File *
@@ -577,19 +567,14 @@ eio_file_chown(const char *path,
577 c->user = eina_stringshare_add(user); 567 c->user = eina_stringshare_add(user);
578 c->group = eina_stringshare_add(group); 568 c->group = eina_stringshare_add(group);
579 569
580 if (eio_file_set(&c->common, 570 if (!eio_file_set(&c->common,
581 done_cb, 571 done_cb,
582 error_cb, 572 error_cb,
583 data, 573 data,
584 _eio_file_chown, 574 _eio_file_chown,
585 _eio_file_chown_done, 575 _eio_file_chown_done,
586 _eio_file_chown_error)) 576 _eio_file_chown_error))
587 return &c->common; 577 return NULL;
588
589 eina_stringshare_del(path);
590 eina_stringshare_del(user);
591 eina_stringshare_del(group);
592 free(c);
593 578
594 return NULL; 579 return &c->common;
595} 580}