Commit Graph

104 Commits

Author SHA1 Message Date
Yomi 0dc33a5aeb Fix misspellings in E's files.
Summary: Fix misspellings and spaces in E's files.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2676
2015-06-16 16:10:21 -04:00
Daniel Kolesa 82116f63ab remove str(n)dupa usages
str(n)dupa are GNU extensions that duplicate a string, using an alloca'd
buffer. This patch removes their definitions from e.h (which should only
contain E's own API, without fallback definitions for libc functions)
which were wrong anyway (they failed in cases where str(n)dupa was an
actual function, not a macro).

Instead, we replace them depending on context with alloca+memcpy+strlen
or a static buffer (used in contexts where we are sure that the buffer
will contain the string entirely)

@fix
2015-05-11 16:45:30 +01:00
Mike Blumenkrantz 471dcb24cb __UNUSED__ -> EINA_UNUSED
this has been bugging me forever. __UNUSED__ is no longer a valid macro here.
2015-03-18 18:09:09 -04:00
Wonguk Jeong c5c7b4733a efm: fix bugs during renaming multiple files and copying file into same directory
Summary:
Since E_FM_OP_OVERWRITE_RESPONSE_NO was sent before file renaming, src had been changed as next file.
->send E_FM_OP_OVERWRITE_RESPONSE_NO after file renaming.

File became empty if I copy a file into same directory
--> first of all, prevent move, rename, symlink into same directory. in case of copy, attach " (copy)" postfix after file name automatically. (need to decide postfix policy)

fixes T739

Reviewers: zmike, raster

CC: seoz, cedric

Maniphest Tasks: T739

Differential Revision: https://phab.enlightenment.org/D707
2014-04-10 11:09:36 +09:00
Mike Blumenkrantz 01abad3f64 bugfix: efm_op no longer tries to close invalid fds during delete ops
CID 1132741
2014-03-13 12:41:53 -04:00
Mike Blumenkrantz d216853252 when rolling back an efm_op task, also remove children tasks
this simplifies/fixes the case where copying directories and canceling the operation would not correctly propagate the cancel to subtasks (contents of the directory)

T680
2013-12-19 14:56:34 -05:00
Mike Blumenkrantz c2c9c3ab72 propagate parent tasks when creating work tasks from scan tasks 2013-12-19 14:55:53 -05:00
Mike Blumenkrantz b93c035176 set efm_op parent tasks when creating new scan tasks for a directory 2013-12-19 14:55:23 -05:00
Mike Blumenkrantz f9c16ba1ce separately calling eina_init after ecore_init in e_fm_op? wtfffffffffffffffffffffffffffffffff 2013-12-19 14:18:02 -05:00
Mike Blumenkrantz f6ec2c6f60 set ecore_app_no_system_modules in various system utilities 2013-12-19 14:14:48 -05:00
Carsten Haitzler 3dc555a7cf fix warnings in build so new ones turn up and get fixed. 2013-07-15 11:45:19 +09:00
Mike Blumenkrantz 9e8e755cdf formatting: all at once
SVN revision: 82625
2013-01-11 10:34:29 +00:00
Igor Murzov b96d338097 Fix inverted arguments for lseek()
Patch from Maxime Villard <rustyBSD@gmx.fr>
"Hum, I've made a mistake in e_fm_op.c with lseek(), I inverted
the two last arguments. However it's not harmful, as SEEK_SET=0.:


SVN revision: 81697
2012-12-25 18:12:31 +00:00
Carsten Haitzler 5ab8396f24 ok - strdupa make sure its defined after other includes in case,.. and
add to e_fm_ipc.c...



SVN revision: 81036
2012-12-16 01:17:45 +00:00
Carsten Haitzler 18b1eb7111 revert that.. its not a double free... its a bizarre-arse macro!
SVN revision: 81012
2012-12-15 07:44:11 +00:00
Carsten Haitzler 320ec625b0 wtf? thats like double-free land.. why strdupa at all? nuts! remove
strdupa's and make code consistent with neighbouring code.



SVN revision: 81006
2012-12-15 01:56:35 +00:00
Mike Blumenkrantz 679cae4fad patch from maxime villard fixing strdupa definition and moving a variable to local scope
SVN revision: 80990
2012-12-14 21:09:21 +00:00
Mike Blumenkrantz f4440456f7 actually we can just strdupa here instead
SVN revision: 80899
2012-12-13 21:28:54 +00:00
Mike Blumenkrantz 925645792e grr meant strncpy!
SVN revision: 80898
2012-12-13 21:25:29 +00:00
Mike Blumenkrantz 9b4ec19471 fix guaranteed crash in efm_op...rustyBSD check this if you happen to read
SVN revision: 80826
2012-12-13 11:49:07 +00:00
Mike Blumenkrantz 4a2837830b another efm_op leak, also wrong E_FREE usage
SVN revision: 80824
2012-12-13 11:34:09 +00:00
Mike Blumenkrantz e0926014a1 fix possible NULL deref in efm_op
SVN revision: 80823
2012-12-13 11:30:40 +00:00
Mike Blumenkrantz c637b2874f fix small leak in efm_op
SVN revision: 80822
2012-12-13 11:27:47 +00:00
Carsten Haitzler b000cf12d6 only srand once.
SVN revision: 80209
2012-12-05 06:21:41 +00:00
Mike Blumenkrantz 7c7927bd4e patch from Maxime Villard fixing a bug in EFM which could cause data loss when dragging directories onto external devices
SVN revision: 79319
2012-11-15 07:31:05 +00:00
Mike Blumenkrantz 568b106bd3 some patch from Maxime Villard for secure deletion fixes again
SVN revision: 78876
2012-11-02 21:02:26 +00:00
Mike Blumenkrantz 7de1d89a0b fix process updating for secure delete operations, efm_op now requires libmath
SVN revision: 78864
2012-11-02 13:44:37 +00:00
Vincent Torri a0bf30b75c E17:
I. Simplification, andif we cannot stat(), the best
thing to do is toswitch to a copy-delete operation.

II.Just stuff...

III. There is a problem with _e_fm_op_random_char().
When wewant to randomize a string we do srand(time())
foreachcharacter, so if the file is small enough
to be deleted inless than a second, it's not randomized.
And even if it's bigger, it's not goodly randomized.Sorry.

Patch by Maxime Villard rustyBSD


SVN revision: 78469
2012-10-25 17:43:52 +00:00
Mike Blumenkrantz 57d8dd8f9b fix cross-device cut+paste
ticket #1638


SVN revision: 78154
2012-10-18 07:55:34 +00:00
Mike Blumenkrantz f5dd030696 patch from rustyBSD fixing file moving to other devices
ticket #1581


SVN revision: 77342
2012-10-03 06:27:40 +00:00
Vincent Torri 0f76b94fc8 E17:
some trivial changes.

I.   _e_fm_op_stdin_handler is unused, so -> removed.

II.  if we cannot malloc _e_fm_op_stdin_buffer, we
     are in big shit, so nullcheck.

III. Formatting.

IV.  if argc < 4 we quit, so we don't need to check
     if argc >= 4.

V.   removed 'ret' variables. They are useless and
     they were not in old revisions.

VI.  _e_fm_op_copy_atom always returns 1, so we don't
     need to always check and return 1.

Patch by Maxime Villard (rustyBSD)


SVN revision: 77221
2012-09-30 08:47:07 +00:00
rustyBSD 1093c09cab From: rustyBSD <rustyBSD@gmx.fr>
Subject: Re: [E-devel] E SVN: caro trunk/e/src/bin



SVN revision: 77216
2012-09-29 02:22:43 +00:00
Carsten Haitzler dfb8541aad allow secure remove to be able to write multiple times... in theory...
but for now it's once. :)



SVN revision: 77147
2012-09-27 10:10:20 +00:00
Carsten Haitzler 17ce568685 lets "secure rm" with buffers of 64k per write and handle dangling
tail too.



SVN revision: 77146
2012-09-27 09:59:36 +00:00
Vincent Torri a7f6c22f5d E17: Added secure delete option (experimental !). Wait for discomfitor to add it to EFM conf panel
When removing a file, we store a E_FM_OP_DESTROY task,
which overwrites file with 3 passes of (~)randomized
data, and when we store a E_FM_OP_REMOVE task, to remove
the randomized file.

If it's a dir, skip E_FM_OP_DESTROY.

Patch by Maxime Villard (rustyBSD)


SVN revision: 77020
2012-09-22 18:29:03 +00:00
Vincent Torri d5e3385fd9 E17: avoid seg fault when the string passed to strlen() is NULL
Patch by Maxime Villard (rustyBSD)


SVN revision: 77016
2012-09-22 12:07:49 +00:00
Vincent Torri 7f93d7305b E17: Patch from Maxime Villard (rustyBSD)
I.
    (strncmp(p, p2, PATH_MAX) == 0) &&
    ((p[p2_len] == '/') || (p[p2_len] == '\0')))

Here we want to know if p and p2 are the same.
It's easier to do a simple 'strcmp(p, p2)', and it's
useless to check the value of p[p2_len], because if
p = p2, p[p2_len] will always be \0.

II. Check the string as for E_FM_OP_MOVE.

III. Just a simplification.
it was something like:
    if (type == E_FM_OP_COPY)
        X;
    if (type == E_FM_OP_COPY)
        Y;
    else ...

I just replaced by
    if (type == E_FM_OP_COPY)
    {
        X;
        Y;
    }
    else ...


SVN revision: 77015
2012-09-22 12:04:42 +00:00
Vincent Torri 8d8f697a3f E17: useless header, useless 'else' and 2 times the same check
Patch by Maxime Villard (rustyBSD)


SVN revision: 76773
2012-09-17 17:25:44 +00:00
Maxime Villard 3dc989c695 From: Maxime Villard <rustyBSD@gmx.fr>
There is a problem with the realpath() call. When moving
a symlink, realpath() gets the path of the pointed file,
and the name assigned to the copied link is the name of
this file.

So we shouldn't use realpath(), but I don't know an equivalent
which doesn't take care of symlinks.

Here is an example patch.


SVN revision: 76721
2012-09-17 03:57:04 +00:00
Mike Blumenkrantz affc6d8d25 another efm_op patch from Maxime Villard, I don't even know what it does
SVN revision: 76686
2012-09-14 17:00:41 +00:00
Mike Blumenkrantz 80c6165036 with the work of Maxime Villard <rustyBSD@gmx.fr>, efm_op can now move files directly when they're on the same device instead of copying then deleting the original
SVN revision: 76674
2012-09-14 15:09:05 +00:00
Maxime Villard 0d45c19468 From: Maxime Villard <rustyBSD@gmx.fr>
$ mkdir /home/test/EMPTY
 $ mkdir /home/test/FULL
 $ cd /home/test
 $ ln -s EMPTY link

 Now move (with EFM) the 'FULL' folder to the 'link' (without
 opening it), and 'FULL' diseappear.

 As the symlink points directly to 'EMPTY', we have not the
 full path. So the 'FULL' directory is moved to ~/, instead
 of the desired dest.

 Here is a quickly-made a patch.


SVN revision: 76591
2012-09-13 08:34:24 +00:00
Mike Blumenkrantz 3e1bb5843c send initial progress from efm slave to set src and dest paths in efm
SVN revision: 76416
2012-09-10 15:46:38 +00:00
Mike Blumenkrantz f59fa03035 send progress of 0% when overwrite warning is sent to ensure that we have the src and dest accessible in efm
SVN revision: 76412
2012-09-10 14:39:07 +00:00
Mike Blumenkrantz 5e7a8a0892 SVN revision: 75698
SPANK SPANK SPANK, DO NOT COMMIT PATCHES YOU DO NOT UNDERSTAND OR HAVE NOT TESTED.


SVN revision: 75988
2012-09-03 09:39:30 +00:00
Vincent Torri f84af67928 E17: remove useless symlink (as we don't rename anymore) and remove useless function _e_fm_op_update_progress_report_simple()
Patch by Maxime Villard

SVN revision: 75698
2012-08-25 09:22:09 +00:00
Vincent Torri 4812a5f372 E: minor changes
* useless define
 * formatting and useless comment
 * fread() returns a number >= 0
 * symlink returns -1 on error

SVN revision: 75687
2012-08-24 22:18:43 +00:00
Vincent Torri 053476d676 E: managing overwrite when moving files
The rename() function deletes dest file if it exists,
so there is no overwrite handling. Instead of
testing a rename() and if it fails creating a task
to copy-delete the file, we directly create this
task, which handles overwrite.

Patch by Maxime Villard (rustyBSD)


SVN revision: 75489
2012-08-21 07:40:31 +00:00
Vincent Torri 25aa4e5a89 E: add overwrite handling.
Patch by Maxime Villard (rustyBSD)

SVN revision: 75436
2012-08-19 18:35:10 +00:00
Vincent Torri d9f3d89a07 E: remove useless op
we chmod the created symlink. It's useless, because
we use stat() which gives st_mode of pointed file/folder,
and then we use chmod(), which follows symlink; so we
are chmoding a file to the same permissions it had
before.

Patch by Maxile Villard

SVN revision: 75435
2012-08-19 18:27:18 +00:00