Add missing return value for MTPDevice filePush function

This commit is contained in:
Jimmy Ohn 2020-01-06 14:08:47 +09:00
parent f9b33f305d
commit 2b5be19c1d
1 changed files with 9 additions and 2 deletions

View File

@ -463,8 +463,12 @@ int SMTPFileSystem::mknod(const char *path, mode_t mode, dev_t dev)
if (rval < 0)
return -errno;
m_device.filePush(tmp_path, std::string(path));
rval = m_device.filePush(tmp_path, std::string(path));
::unlink(tmp_path.c_str());
if (rval != 0)
return rval;
return 0;
}
@ -578,7 +582,10 @@ int SMTPFileSystem::create(const char *path, mode_t mode, fuse_file_info *file_i
file_info->fh = rval;
m_tmp_files_pool.addFile(TypeTmpFile(std::string(path), tmp_path, rval, true));
m_device.filePush(tmp_path, std::string(path));
rval = m_device.filePush(tmp_path, std::string(path));
if (rval != 0)
return rval;
return 0;
}