}
const auto &path = path_build(ANGBAND_DIR_USER, movie_filename);
- const auto &filename = path.string();
- auto fd = fd_open(filename, O_RDONLY);
+ auto fd = fd_open(path, O_RDONLY);
if (fd >= 0) {
+ const auto &filename = path.string();
(void)fd_close(fd);
std::string query = _("現存するファイルに上>書きしますか? (", "Replace existing file ");
query.append(filename);
return;
}
- movie_fd = fd_open(filename, O_WRONLY | O_TRUNC);
+ movie_fd = fd_open(path, O_WRONLY | O_TRUNC);
} else {
movie_fd = fd_make(path);
}