may have gotten the gremlin; was an interaction that separate used to handle, but...
[feisty_meow.git] / nucleus / library / filesystem / heavy_file_ops.cpp
index 0900b4328b9b52d5f4129b0d0158597d59421430..05da6a992b58f267540ebceb8577098aba0e99ef 100644 (file)
@@ -176,7 +176,11 @@ outcome heavy_file_operations::write_file_chunk(const astring &target,
   if (byte_start < 0) return BAD_INPUT;
 
   filename targ_name(target);
-  if (!directory::recursive_create(targ_name.dirname().raw())) {
+  astring targ_dir = targ_name.dirname().raw();
+#ifdef DEBUG_HEAVY_FILE_OPS
+  LOG(astring("creating target's directory: ") + targ_name.dirname().raw());
+#endif
+  if (!directory::recursive_create(targ_dir)) {
     LOG(astring("failed to create directory: ") + targ_name.dirname().raw());
     return TARGET_DIR_ERROR;
   }