Fix MovieWriter checking wrong directory for disk space

MovieWriter was using get_basename() which strips the file extension
but keeps the filename, resulting in checking the current working
directory instead of the target output directory.

Changed to use get_base_dir() to properly extract the directory path
where the movie file will actually be written.

Fixes #113391
This commit is contained in:
Eshaan 2025-12-02 00:23:58 +11:00
parent 7ed0b61676
commit b1ef01dcee

View file

@ -114,7 +114,7 @@ void MovieWriter::begin(const Size2i &p_movie_size, uint32_t p_fps, const String
// Check for available disk space and warn the user if needed.
Ref<DirAccess> dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
String path = p_base_path.get_basename();
String path = p_base_path.get_base_dir();
if (path.is_relative_path()) {
path = "res://" + path;
}