<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Taken from: https://sources.debian.org/src/draco/1.5.6+dfsg-3/debian/patches/0006-Fix-tinygltf-FsCallbacks.patch/


--- src/draco/io/gltf_decoder.cc.orig
+++ src/draco/io/gltf_decoder.cc
@@ -427,6 +427,13 @@
   return WriteBufferToFile(contents.data(), contents.size(), filepath);
 }
 
+bool GetFileSizeInBytes(size_t *out, std::string * /*err*/,
+                        const std::string &amp;filepath, void * /*user_data*/) {
+  *out = GetFileSize(filepath);
+  return true;
+}
+
+
 }  // namespace
 
 GltfDecoder::GltfDecoder()
@@ -486,6 +493,7 @@
       // TinyGLTF's ExpandFilePath does not do filesystem i/o, so it's safe to
       // use in all environments.
       &amp;tinygltf::ExpandFilePath, &amp;ReadWholeFile, &amp;WriteWholeFile,
+      &amp;GetFileSizeInBytes,
       reinterpret_cast&lt;void *&gt;(input_files)};
 
   loader.SetFsCallbacks(fs_callbacks);
</pre></body></html>