Working DTSC Merge

This commit is contained in:
Erik Zandvliet 2013-12-20 13:07:38 +01:00
parent 1cf6e34745
commit 06b5596b2a

View file

@ -476,16 +476,14 @@ DTSC::File::File(const File & rhs){
DTSC::File & DTSC::File::operator =(const File & rhs){ DTSC::File & DTSC::File::operator =(const File & rhs){
created = rhs.created; created = rhs.created;
if (rhs.F){ if (rhs.F){
int tmpFd = fileno(rhs.F); F = fdopen( dup(fileno(rhs.F)), (created ? "w+b": "r+b"));
int newFd = dup(tmpFd);
F = fdopen( newFd, (created ? "w+b": "r+b"));
}else{ }else{
F = 0; F = 0;
} }
endPos = rhs.endPos; endPos = rhs.endPos;
strbuffer = rhs.strbuffer; strbuffer = rhs.strbuffer;
jsonbuffer = rhs.jsonbuffer; metaStorage = rhs.metaStorage;
metadata = rhs.metadata; metadata = metaStorage;
currtime = rhs.currtime; currtime = rhs.currtime;
lastreadpos = rhs.lastreadpos; lastreadpos = rhs.lastreadpos;
headerSize = rhs.headerSize; headerSize = rhs.headerSize;