[PATCH] core/coio_file: copyfile -- Make it behave as regular cp

Vladimir Davydov vdavydov.dev at gmail.com
Mon May 6 11:37:29 MSK 2019


On Sat, May 04, 2019 at 06:49:22PM +0300, Cyrill Gorcunov wrote:
> Traditional cp utility opens destination with O_TRUNC
> flag, iow it drops old content of the target file if
> such exists.
> 
> Fixes #4181
> ---
> https://github.com/tarantool/tarantool/issues/4181
> 
> Guys, take a look please, this is change in behaviour but
> should be acceptable.
> 
> Also I just wondered that most of tests in test/app/fio.test.lua
> do pass octal modes as 0777 while lua's number parser simply doesn't
> understand octal form. So that I had to pass mode 420 by hands which
> is an alias to 0644.

I guess we should change 0644 to tonumber('644', 8) across the whole
test suite. Could you please do it in a separate patch?

Anyway, the new test case passes both with and without this patch, which
means it's useless. Please make sure it fails without the changes made
to the code by this patch.

Thanks.



More information about the Tarantool-patches mailing list