return;
}
- char buf[1024];
- path_build(buf, sizeof(buf), ANGBAND_DIR_USER, movie_filename);
- auto fd = fd_open(buf, O_RDONLY);
+ const auto &path = path_build(ANGBAND_DIR_USER, movie_filename);
+ const auto &filename = path.string();
+ auto fd = fd_open(filename, O_RDONLY);
if (fd >= 0) {
(void)fd_close(fd);
std::string query = _("現存するファイルに上>書きしますか? (", "Replace existing file ");
- query.append(buf);
+ query.append(filename);
query.append(_(")", "? "));
if (!get_check(query)) {
return;
}
- movie_fd = fd_open(buf, O_WRONLY | O_TRUNC);
+ movie_fd = fd_open(filename, O_WRONLY | O_TRUNC);
} else {
- movie_fd = fd_make(buf);
+ movie_fd = fd_make(filename);
}
if (!movie_fd) {
#ifndef WINDOWS
void prepare_browse_movie_with_path_build(std::string_view filename)
{
- char buf[1024];
- path_build(buf, sizeof(buf), ANGBAND_DIR_USER, filename);
- movie_fd = fd_open(buf, O_RDONLY);
+ const auto &path = path_build(ANGBAND_DIR_USER, filename);
+ movie_fd = fd_open(path.string(), O_RDONLY);
init_buffer();
}
#endif