i've forgotten to say that it was a patch from Maxime Villard (rustyBSD) sorry
Vincent On Sat, Aug 25, 2012 at 12:18 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > E: minor changes > > * useless define > * formatting and useless comment > * fread() returns a number >= 0 > * symlink returns -1 on error > > Author: caro > Date: 2012-08-24 15:18:43 -0700 (Fri, 24 Aug 2012) > New Revision: 75687 > Trac: http://trac.enlightenment.org/e/changeset/75687 > > Modified: > trunk/e/src/bin/e_fm_op.c > > Modified: trunk/e/src/bin/e_fm_op.c > =================================================================== > --- trunk/e/src/bin/e_fm_op.c 2012-08-24 21:03:07 UTC (rev 75686) > +++ trunk/e/src/bin/e_fm_op.c 2012-08-24 22:18:43 UTC (rev 75687) > @@ -49,12 +49,6 @@ > > #define E_FREE(p) do { free(p); p = NULL; } while (0) > > -#define LG(fmt, args ...) { \ > - FILE *f = fopen("log", "a"); \ > - if (f) fprintf(f, fmt, ##args); \ > - if (f) fclose(f); \ > -} > - > typedef struct _E_Fm_Op_Task E_Fm_Op_Task; > typedef struct _E_Fm_Op_Copy_Data E_Fm_Op_Copy_Data; > > @@ -284,8 +278,6 @@ > { > E_Fm_Op_Task *task; > > - /* If that doesn't work, setup a copy and delete operation. > - It's not atomic, but it's the best we can do. */ > task = _e_fm_op_task_new(); > task->type = type; > task->src.name = eina_stringshare_add(argv[2]); > @@ -1165,7 +1157,7 @@ > { > E_FM_OP_DEBUG("Creating link from '%s' to '%s'\n", lnk_path, > task->dst.name); > > - if (symlink(lnk_path, task->dst.name) != 0) > + if (symlink(lnk_path, task->dst.name) == -1) > { > if (errno == EEXIST) > { > @@ -1264,7 +1256,7 @@ > } > > dread = fread(buf, 1, sizeof(buf), data->from); > - if (dread <= 0) > + if (dread == 0) > { > if (!feof(data->from)) > _E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot read data > from '%s': %s.", task->dst.name); > @@ -1338,7 +1330,7 @@ > return 1; > } > > - if (S_ISLNK(task->src.st.st_mode)) > + if (S_ISLNK(task->src.st.st_mode)) > { > char *dst_dir; > > @@ -1516,7 +1508,7 @@ > > E_FM_OP_DEBUG("Symlink: %s -> %s\n", task->src.name, task->dst.name); > > - if (symlink(task->src.name, task->dst.name) != 0) > + if (symlink(task->src.name, task->dst.name) == -1) > { > if (errno == EEXIST) > { > @@ -1550,7 +1542,9 @@ > if (errno == ENOTEMPTY) > { > E_FM_OP_DEBUG("Attempt to remove non-empty directory.\n"); > - /* This should never happen due to way tasks are added to > the work queue. If this happens (for example new files were created after the > scan was complete), implicitly delete everything. */ > + /* This should never happen due to way tasks are added to > the work queue. > + If this happens (for example new files were created > after the scan was > + complete), implicitly delete everything. */ > ecore_file_recursive_rm(task->src.name); > task->finished = 1; /* Make sure that task is removed. */ > return 1; > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel