From: hama Date: Wed, 5 Aug 2015 11:52:37 +0000 (+0200) Subject: Merge branch 'master' of git@f-r-e-i.de:/home/git/repo/crepublib X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=e8b9f52ef11c2df7d46bba4526b86cc2ba32a9af;p=crepublib Merge branch 'master' of git@f-r-e-i.de:/home/git/repo/crepublib Conflicts: base/ReDirectory.cpp base/ReDirectory.hpp base/ReSerializable.cpp cunit/cuReDirTools.cpp os/ReDirTools.cpp os/ReTraverser.cpp --- e8b9f52ef11c2df7d46bba4526b86cc2ba32a9af diff --cc cunit/cuReFileUtils.cpp index fcdc7c8,5b43af6..aafd43d --- a/cunit/cuReFileUtils.cpp +++ b/cunit/cuReFileUtils.cpp @@@ -36,10 -36,10 +36,10 @@@ private ReFileUtils::readString("/./././.", buffer); checkEqu("", buffer); } - void testSetFiles(){ + void testSetFiles() { ReByteArray name = ReFileUtils::tempFile("setfile_test.dat"); struct stat info; - unlink(name.str()); + _unlink(name.str()); ReFileUtils::writeString(name.str(), ""); checkEqu(0, stat(name.str(), &info)); struct tm time1; @@@ -55,13 -55,18 +55,18 @@@ ReFileUtils::timeToFiletime(time2, time3); ReFileTime_t time4; int diff = 86400 + 2 * 3600 + 3 * 60 + 2; - ReFileUtils::timeToFiletime(time2 + diff, time4); + ReFileUtils::timeToFiletime(time2 + diff, time4); ReFileUtils::setTimes(name.str(), time3, &time4, NULL); checkEqu(0, stat(name.str(), &info)); + #if defined __linux__ checkT(time2 == info.st_mtim.tv_sec); checkT(time2 + diff == info.st_atim.tv_sec); + #elif defined __WIN32__ + checkT(time2 == info.st_mtime); + checkT(time2 + diff == info.st_atime); + #endif } - void testTempFile(){ + void testTempFile() { const char* subdir = "refileutiltest"; const char* node = "test1.$$.txt"; ReByteArray dir = ReFileUtils::tempDir(subdir);