Anis Elleuch
87f7e65c4c
Disallow copying/mirroring a folder into itself ( #2553 )
...
As unix cp command complains when you copy a directory into itself,
(such as `cp -r ~/Desktop/ ~/Desktop/sub/`), mc will follow the
same behavior with this commit.
The main reason is that copy or mirror command can be unpredictable
with the style of copy.
Example:
```
$ mc ls -r myminio/testbucket/
[2018-09-25 19:28:17 CET] 8B dir/object
[2018-09-25 19:28:40 CET] 8B object
$ mc -q cp -r myminio/testbucket/ myminio/testbucket/dir/
`myminio/testbucket/dir/object` -> `myminio/testbucket/dir/dir/object`
`myminio/testbucket/object` -> `myminio/testbucket/dir/object`
```
We can notice that `myminio/testbucket/dir/object` is both source and target
in the copy operation. The last copy operation that will occur will rule the
result of the total copy operation and `myminio/testbucket/dir/dir/object`
will have a different content in each copy operation.
Due to the unpredictability mentionned above, we will disallow copying or
mirroring a folder into itself.
2018-09-25 17:34:40 -07:00
..
2016-11-08 10:55:55 -08:00
2018-08-30 22:31:08 +05:30
2018-09-19 11:48:21 -07:00
2018-08-17 18:55:05 -07:00
2017-03-31 01:12:00 -07:00
2018-03-23 12:22:55 +05:30
2018-02-15 18:35:05 -08:00
2018-03-23 12:22:55 +05:30
2018-09-20 15:23:40 -07:00
2018-06-01 09:16:01 +05:30
2018-08-06 12:59:13 -07:00
2018-09-10 16:23:17 -07:00
2018-06-01 09:16:01 +05:30
2018-06-01 09:16:01 +05:30
2018-06-01 09:16:01 +05:30
2017-05-16 18:50:54 +02:00
2016-08-17 18:30:01 -07:00
2017-10-04 16:49:35 -07:00
2018-07-12 11:13:51 -07:00
2018-04-13 13:57:07 -07:00
2018-02-13 15:40:46 -08:00
2018-06-29 14:56:07 -07:00
2017-10-31 13:56:40 -07:00
2017-10-31 13:56:40 -07:00
2017-10-31 13:56:40 -07:00
2017-12-29 14:14:24 +05:30
2018-03-08 17:18:41 +05:30
2017-10-31 13:56:40 -07:00
2018-06-20 17:47:26 -07:00
2018-03-08 17:18:41 +05:30
2018-08-17 17:15:03 -07:00
2018-08-17 17:15:03 -07:00
2018-08-30 22:31:08 +05:30
2017-02-25 11:08:32 -08:00
2018-07-12 11:13:51 -07:00
2018-03-08 17:18:41 +05:30
2018-07-29 00:45:12 -07:00
2018-08-30 22:22:53 +05:30
2018-07-16 08:27:22 -07:00
2018-07-31 20:53:39 +05:30
2018-03-23 12:22:55 +05:30
2017-03-11 18:50:56 -08:00
2018-02-10 14:39:12 -08:00
2017-02-27 11:44:26 -08:00
2018-07-16 08:27:22 -07:00
2018-04-13 13:57:07 -07:00
2017-11-13 12:53:11 -08:00
2018-02-10 14:39:12 -08:00
2018-07-16 08:27:22 -07:00
2018-02-10 14:39:12 -08:00
2018-08-30 22:22:53 +05:30
2018-08-30 22:31:08 +05:30
2018-09-25 17:34:40 -07:00
2018-07-12 11:13:51 -07:00
2018-07-12 11:13:51 -07:00
2017-10-12 14:52:21 -07:00
2018-04-26 11:21:10 -07:00
2018-06-29 14:56:07 -07:00
2017-08-14 11:13:38 -07:00
2018-04-05 13:19:16 -07:00
2017-02-27 11:44:26 -08:00
2018-04-05 13:19:16 -07:00
2018-01-23 13:17:47 +05:30
2018-07-22 15:03:09 -07:00
2018-06-04 17:20:07 -07:00
2017-09-26 10:17:17 -07:00
2017-01-05 01:36:01 -08:00
2017-01-05 01:36:01 -08:00
2018-02-10 14:39:12 -08:00
2017-02-20 22:04:54 +01:00
2016-08-17 18:26:18 -07:00
2018-07-12 11:13:51 -07:00
2018-06-04 17:20:07 -07:00
2017-10-31 13:56:40 -07:00
2018-06-29 14:56:07 -07:00
2018-04-13 13:57:07 -07:00
2018-09-25 10:20:14 -07:00
2018-09-25 17:34:40 -07:00
2017-02-20 22:04:54 +01:00
2018-08-30 22:31:08 +05:30
2018-07-12 11:13:51 -07:00
2017-04-24 01:01:11 -07:00
2017-04-24 01:01:11 -07:00
2018-03-23 12:22:55 +05:30
2017-06-13 14:51:20 -07:00
2017-06-12 14:06:50 -07:00
2016-08-17 18:26:18 -07:00
2018-01-23 12:32:58 -08:00
2018-07-12 11:13:51 -07:00
2016-08-17 18:26:18 -07:00
2018-01-23 12:32:58 -08:00
2016-09-01 18:36:00 -07:00
2017-10-21 07:59:12 +05:30
2017-10-21 07:59:12 +05:30
2017-08-17 10:55:32 -07:00
2018-07-16 08:27:22 -07:00
2018-07-16 08:27:22 -07:00
2017-10-21 07:59:12 +05:30
2018-07-16 08:27:22 -07:00
2017-08-14 11:13:38 -07:00
2018-07-16 08:27:22 -07:00
2018-07-12 11:13:51 -07:00
2017-08-14 11:13:38 -07:00
2017-08-14 11:13:38 -07:00
2017-12-06 16:00:10 +05:30
2017-08-14 11:13:38 -07:00
2016-08-17 18:26:18 -07:00
2017-10-31 13:56:40 -07:00
2018-07-12 11:13:51 -07:00
2018-07-12 11:13:51 -07:00
2018-08-30 22:31:08 +05:30
2018-02-15 18:35:05 -08:00
2018-09-20 15:23:40 -07:00
2018-03-23 12:22:55 +05:30
2018-03-08 17:18:41 +05:30
2018-03-14 02:47:14 -07:00
2018-09-25 17:34:40 -07:00
2016-08-17 18:30:01 -07:00
2017-08-14 11:13:38 -07:00
2017-10-13 17:28:29 -07:00
2017-10-09 19:44:58 -07:00