]> git.tdb.fi Git - builder.git/blobdiff - source/tar.cpp
Reorder class members
[builder.git] / source / tar.cpp
index 0b61b39b85cd4567b8eaf139ee29fb89958d2a53..797bf240425e4fe78451376a55c6e7ecaca38b79 100644 (file)
@@ -1,13 +1,15 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
 #include <iostream>
+#include <cstring>
+#include <msp/fs/stat.h>
+#include <msp/fs/utils.h>
 #include <msp/io/file.h>
-#include <msp/path/utils.h>
 #include "builder.h"
 #include "sourcepackage.h"
 #include "tar.h"
@@ -38,8 +40,8 @@ Tar::Worker::Worker(Tar &t):
 
 void Tar::Worker::main()
 {
-       const Path &pkg_src=tar.tarball.get_package()->get_source();
-       Path basedir=splitext(basename(tar.tarball.get_name())).base;
+       const FS::Path &pkg_src=tar.tarball.get_package()->get_source();
+       FS::Path basedir=FS::basepart(FS::basename(tar.tarball.get_name()));
 
        IO::File out(tar.tarball.get_name(), IO::M_WRITE);
        const TargetList &deps=tar.tarball.get_depends();
@@ -58,7 +60,7 @@ void Tar::Worker::main()
 
                memcpy(buf, rel_path.data(), rel_path.size());
 
-               struct stat st=stat((*i)->get_name());
+               struct stat st=FS::stat((*i)->get_name());
                store_number(buf+100, st.st_mode, 7);
                store_number(buf+108, st.st_uid, 7);
                store_number(buf+116, st.st_gid, 7);