summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-11-08 15:19:36 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-11-08 15:19:36 (GMT)
commit7961c8685bf98ffc929863dffc9ee97573ddd0ba (patch)
tree6159d7ac762b7f9441139885655fc9f430718acd /Source/cmSystemTools.cxx
parent3c17c4117fff11a6a426a77e2402a1da9f1ec5de (diff)
downloadCMake-7961c8685bf98ffc929863dffc9ee97573ddd0ba.zip
CMake-7961c8685bf98ffc929863dffc9ee97573ddd0ba.tar.gz
CMake-7961c8685bf98ffc929863dffc9ee97573ddd0ba.tar.bz2
go back to running stat and put size check in
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index d211454..f18685f 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1800,8 +1800,10 @@ bool cmSystemTools::CreateTar(const char* outFileName,
std::cout << rp << "\n";
}
// Set the name of the entry to the file name
- archive_entry_set_pathname(entry, rp.c_str());
- res = archive_read_disk_entry_from_file(disk, entry, -1, 0);
+ archive_entry_set_pathname(entry, rp.c_str());
+ struct stat s;
+ stat(fileIt->c_str(), &s);
+ archive_read_disk_entry_from_file(disk, entry, -1, &s);
CHECK_ARCHIVE_ERROR(res, "read disk entry:");
// write entry header
@@ -1821,7 +1823,6 @@ bool cmSystemTools::CreateTar(const char* outFileName,
while (len > 0)
{
int wlen = archive_write_data(a, buff, len);
-#if 0
if(wlen != len)
{
cmOStringStream error;
@@ -1833,7 +1834,6 @@ bool cmSystemTools::CreateTar(const char* outFileName,
);
return false;
}
-#endif
len = fread(buff, 1, sizeof(buff), file);
}
// close the file and free the entry