Trying to delete a non-empty directory or rename any directory
to an existing, non-empty one results in generic error (PP_ERROR_FAILED
that is translated to EPERM by nacl_io). Expected result of such
operation would be something that translates to EEXIST or ENOTEMPTY.
This patch makes PPB_FileRef methods mentioned above
result in PP_ERROR_FILEEXISTS, so that it is translated
to EEXIST by nacl_io.
Ported patch from M94 Aura:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/280551/
Change-Id: Ifebf80cc78370a3a170a86dcbd4eb2d10bb41c5a
Signed-off-by: pengxia <pengxia.shen@samsung.com>
case base::File::FILE_OK:
return PP_OK;
case base::File::FILE_ERROR_EXISTS:
+ case base::File::FILE_ERROR_NOT_EMPTY:
return PP_ERROR_FILEEXISTS;
case base::File::FILE_ERROR_NOT_FOUND:
return PP_ERROR_FILENOTFOUND;