diff --git a/env/fs_remap.cc b/env/fs_remap.cc index b75121f449732669e28f7aaadc73812e337a00dd..fd92411814bd23c3f922090ac212ba87c7b589fe 100644 --- a/env/fs_remap.cc +++ b/env/fs_remap.cc @@ -268,6 +268,10 @@ IOStatus RemapFileSystem::RenameFile(const std::string& src, IODebugContext* dbg) { auto status_and_src_enc_path = EncodePath(src); if (!status_and_src_enc_path.first.ok()) { + if (status_and_src_enc_path.first.IsNotFound()) { + const IOStatus& s = status_and_src_enc_path.first; + status_and_src_enc_path.first = IOStatus::PathNotFound(s.ToString()); + } return status_and_src_enc_path.first; } auto status_and_dest_enc_path = EncodePathWithNewBasename(dest);