- 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);