Parcourir la source

Create bundle dir if it does not exist

Daniele Bartolini il y a 9 ans
Parent
commit
933c966ab5
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/device/device.cpp

+ 3 - 0
src/device/device.cpp

@@ -340,6 +340,9 @@ void Device::run()
 			bundle_dir = os::getcwd(buf, sizeof(buf));
 		}
 		_bundle_filesystem = CE_NEW(_allocator, DiskFilesystem)(default_allocator(), bundle_dir);
+		if (!_bundle_filesystem->exists(bundle_dir))
+			_bundle_filesystem->create_directory(bundle_dir);
+
 		_last_log = _bundle_filesystem->open(CROWN_LAST_LOG, FileOpenMode::WRITE);
 #endif // CROWN_PLATFORM_ANDROID