#include <msp/core/maputils.h>
+#include <msp/fs/dir.h>
#include <msp/fs/stat.h>
+#include <msp/fs/utils.h>
#include <msp/io/file.h>
#include <msp/io/print.h>
#include <msp/strings/utils.h>
Cache::Cache(SourcePackage &p):
package(p),
- filename(package.get_temp_dir()/"../cache"),
+ filename(package.get_temp_directory()/"../cache"),
changed(false)
{ }
if(data.empty() || !changed)
return;
+ FS::Path dir = FS::dirname(filename);
+ if(!FS::exists(dir))
+ FS::mkpath(dir, 0755);
package.get_builder().get_logger().log("files", format("Writing %s", filename));
IO::BufferedFile out(filename.str(), IO::M_WRITE);