Skip to content

Commit

Permalink
Remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Oct 7, 2024
1 parent 83363d2 commit 2d76748
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 56 deletions.
14 changes: 0 additions & 14 deletions PowerEditor/src/MISC/Common/FileInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ using namespace std;

Win32_IO_File::Win32_IO_File(const wchar_t *fname)
{
//std::wstring msg = fname;
//msg += L"\t ENTERING Win32_IO_File::Win32_IO_File(name)";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());
if (fname)
{
std::wstring fn = fname;
Expand Down Expand Up @@ -55,16 +52,8 @@ Win32_IO_File::Win32_IO_File(const wchar_t *fname)
}
}

//msg = fname;
//msg += L"\t BEFORE CreateFileW";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

_hFile = ::createFileWaitSec(fname, _accessParam, _shareParam, dispParam, _attribParam);

//msg = fname;
//msg += L"\t AFTER CreateFileW";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

// Race condition management:
// If file didn't exist while calling PathFileExistsW, but before calling CreateFileW, file is created: use CREATE_ALWAYS is OK
// If file did exist while calling PathFileExistsW, but before calling CreateFileW, file is deleted: use TRUNCATE_EXISTING will cause the error
Expand Down Expand Up @@ -102,9 +91,6 @@ Win32_IO_File::Win32_IO_File(const wchar_t *fname)
writeLog(nppIssueLog.c_str(), msg.c_str());
}
}
//msg = fname;
//msg += L"\t QUITING Win32_IO_File::Win32_IO_File(name)";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());
}

void Win32_IO_File::close()
Expand Down
18 changes: 1 addition & 17 deletions PowerEditor/src/ScintillaComponent/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1215,16 +1215,8 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool

int encoding = buffer->getEncoding();

//wstring msg = fullpath;
//msg += L"\t BEFORE UnicodeConvertor.openFile : 1";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

if (UnicodeConvertor.openFile(fullpath))
{
//msg = fullpath;
//msg += L"\t AFTER UnicodeConvertor.openFile : 2";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, buffer->_doc); //generate new document

size_t lengthDoc = _pscratchTilla->getCurrentDocLen();
Expand Down Expand Up @@ -1261,9 +1253,7 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool
}
}
}
//msg = fullpath;
//msg += L"\t BEFORE UnicodeConvertor.closeFile()";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

UnicodeConvertor.closeFile();

// Error, we didn't write the entire document to disk.
Expand Down Expand Up @@ -1319,12 +1309,6 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool
}
else
{
//msg = fullpath;
//msg += L"\t AFTER openFile : 3 ";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());
//msg = fullpath;
//msg += L" return SavingStatus::SaveOpenFailed";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());
return SavingStatus::SaveOpenFailed;
}
}
Expand Down
25 changes: 0 additions & 25 deletions PowerEditor/src/Utf8_16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,42 +301,17 @@ Utf8_16_Write::~Utf8_16_Write()

bool Utf8_16_Write::openFile(const wchar_t *name)
{
//std::wstring msg = name;
//msg += L"\t BEFORE std::make_unique<Win32_IO_File>(name)";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

m_pFile = std::make_unique<Win32_IO_File>(name);

//msg = name;
//msg += L"\t AFTER std::make_unique<Win32_IO_File>(name)";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

if (!m_pFile)
{
//msg = name;
//msg += L"\t !m_pFile -> return!!";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());
return false;
}

//msg = name;
//msg += L"\t BEFORE \"!m_pFile->isOpened()\"";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

if (!m_pFile->isOpened())
{
//msg = name;
//msg += L"\t AFTER \"!m_pFile->isOpened() -> return false\"";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

m_pFile = nullptr;
return false;
}

//msg = name;
//msg += L"\t AFTER \"!m_pFile->isOpened() -> return true\"";
//writeLog(L"c:\\tmp\\XXXX", msg.c_str());

m_bFirstWrite = true;

return true;
Expand Down

0 comments on commit 2d76748

Please sign in to comment.