* Revert r15436. This was a workaround for a bug in btrfs which seems

to have been fixed now.
This commit is contained in:
Eelco Dolstra 2010-05-04 12:42:58 +00:00
parent f92c9a0ac5
commit a0e3b84fac
2 changed files with 0 additions and 9 deletions

View file

@ -181,8 +181,6 @@ static void parseContents(ParseSink & sink, Source & source, const Path & path)
left -= n; left -= n;
} }
sink.finalizeContents(size);
readPadding(size, source); readPadding(size, source);
} }
@ -317,12 +315,6 @@ struct RestoreSink : ParseSink
writeFull(fd, data, len); writeFull(fd, data, len);
} }
void finalizeContents(unsigned long long size)
{
errno = ftruncate(fd, size);
if (errno) throw SysError(format("truncating file to its allocated length of %1% bytes") % size);
}
void createSymlink(const Path & path, const string & target) void createSymlink(const Path & path, const string & target)
{ {
Path p = dstPath + path; Path p = dstPath + path;

View file

@ -64,7 +64,6 @@ struct ParseSink
virtual void isExecutable() { }; virtual void isExecutable() { };
virtual void preallocateContents(unsigned long long size) { }; virtual void preallocateContents(unsigned long long size) { };
virtual void receiveContents(unsigned char * data, unsigned int len) { }; virtual void receiveContents(unsigned char * data, unsigned int len) { };
virtual void finalizeContents(unsigned long long size) { };
virtual void createSymlink(const Path & path, const string & target) { }; virtual void createSymlink(const Path & path, const string & target) { };
}; };