Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Src/FileTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,6 @@ bool PrediffingInfo::Prediffing(int target, String & filepath, const String& fil
storageForPlugins bufferData;
// detect Ansi or Unicode file
bufferData.SetDataFileUnknown(filepath, bMayOverwrite);
// TODO : set the codepage
// bufferData.SetCodepage();

LPDISPATCH piScript = plugin->m_lpDispatch;
Poco::FastMutex::ScopedLock lock(g_mutex);
Expand Down
30 changes: 27 additions & 3 deletions Src/PatchTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,20 @@ void CPatchTool::AddFiles(const String &file1, const String &file2)
tFiles.lfile = file1;
tFiles.rfile = file2;

// TODO: Read and add file's timestamps
m_fileList.push_back(tFiles);
#ifdef _WIN32
struct _stat64 statLeft, statRight;
if (_wstat64(file1.c_str(), &statLeft) == 0)
tFiles.ltime = statLeft.st_mtime;
if (_wstat64(file2.c_str(), &statRight) == 0)
tFiles.rtime = statRight.st_mtime;
#else
struct stat statLeft, statRight;
if (stat(file1.c_str(), &statLeft) == 0)
tFiles.ltime = statLeft.st_mtime;
if (stat(file2.c_str(), &statRight) == 0)
tFiles.rtime = statRight.st_mtime;
#endif
m_fileList.push_back(tFiles);
}

/**
Expand All @@ -72,7 +84,19 @@ void CPatchTool::AddFiles(const String &file1, const String &altPath1,
tFiles.pathLeft = altPath1;
tFiles.pathRight = altPath2;

// TODO: Read and add file's timestamps
#ifdef _WIN32
struct _stat64 statLeft, statRight;
if (_wstat64(file1.c_str(), &statLeft) == 0)
tFiles.ltime = statLeft.st_mtime;
if (_wstat64(file2.c_str(), &statRight) == 0)
tFiles.rtime = statRight.st_mtime;
#else
struct stat statLeft, statRight;
if (stat(file1.c_str(), &statLeft) == 0)
tFiles.ltime = statLeft.st_mtime;
if (stat(file2.c_str(), &statRight) == 0)
tFiles.rtime = statRight.st_mtime;
#endif
m_fileList.push_back(tFiles);
}

Expand Down
Loading