Files
mc/cmd
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-08-17 18:30:01 -07:00
2016-08-17 18:26:18 -07:00
2017-10-31 13:56:40 -07:00
2016-08-17 18:26:18 -07:00
2016-08-17 18:26:18 -07:00
2016-08-17 18:26:18 -07:00
2017-10-31 13:56:40 -07:00
2016-08-17 18:30:01 -07:00
2017-10-09 19:44:58 -07:00