mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: DirDiff file comparison now ignores CR
This commit is contained in:
parent
9248e5478a
commit
c656b739f6
1 changed files with 5 additions and 6 deletions
|
|
@ -182,16 +182,13 @@ void DirDiffDlg::GatherFilesDeep(VectorMap<String, Time>& files, const String& b
|
|||
bool DirDiffDlg::FileEqual(const String& f1, const String& f2, int& kind)
|
||||
{
|
||||
FileIn in1(f1);
|
||||
in1.SetBufferSize(1024*256);
|
||||
in1.SetBufferSize(1024*256);
|
||||
FileIn in2(f2);
|
||||
if(in1 && in2) {
|
||||
kind = NORMAL_FILE;
|
||||
if(in1.GetSize() != in2.GetSize())
|
||||
return false;
|
||||
|
||||
while(!in1.IsEof() && !in2.IsEof()) {
|
||||
String a = in1.Get(64*1024);
|
||||
String b = in2.Get(64*1024);
|
||||
if(a != b)
|
||||
if(in1.GetLine() != in2.GetLine())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -348,6 +345,8 @@ void DirDiffDlg::File()
|
|||
diff.Set(Null, Null);
|
||||
f1 = LoadFile(p1);
|
||||
f2 = LoadFile(p2);
|
||||
SaveFile("C:/xxx/f1.txt", f1); _DBG_
|
||||
SaveFile("C:/xxx/f2.txt", f2); _DBG_
|
||||
if(split_lines) {
|
||||
f1 = SplitLines(f1);
|
||||
f2 = SplitLines(f2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue