mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-02 01:47:37 +08:00
Monitoring log to show notification and made icon change while transfering $4745
This commit is contained in:
@@ -38,15 +38,18 @@ DropHelper::writeToDir(const String& destination, DragFileList& fileList, String
|
||||
file.open(dropTarget.c_str(), std::ios::out | std::ios::binary);
|
||||
if (!file.is_open()) {
|
||||
LOG((CLOG_ERR "drop file failed: can not open %s", dropTarget.c_str()));
|
||||
LOG((CLOG_NOTIFY "File Transmission Failed: Can not open %s", dropTarget.c_str()));
|
||||
}
|
||||
|
||||
file.write(data.c_str(), data.size());
|
||||
file.close();
|
||||
|
||||
LOG((CLOG_NOTIFY "File Transmission Complete: %s is saved to %s", fileList.at(0).getFilename(), destination.c_str()));
|
||||
|
||||
fileList.clear();
|
||||
}
|
||||
else {
|
||||
LOG((CLOG_ERR "drop file failed: drop target is empty"));
|
||||
LOG((CLOG_NOTIFY "File Transmission Failed: Drop target is empty"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user