Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelfmz <fenix1905@tut.by>2022-11-13 02:02:17 +0300
committerelfmz <fenix1905@tut.by>2022-11-13 02:02:17 +0300
commit4a0860df71235d95c9a04a78e24bc77accbadcb5 (patch)
treec244aab4c6c205c3e8026515d7a3288719438088 /far2l/src/message.cpp
parent1bbd76a8d7f2828c02c058f0b360f8e38e411323 (diff)
Show actual errors from gio/gvfs-trash if delete to recycle bin failed (touch #1401)HEADmaster
Diffstat (limited to 'far2l/src/message.cpp')
-rw-r--r--far2l/src/message.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/far2l/src/message.cpp b/far2l/src/message.cpp
index e2e273dc..3072e5d6 100644
--- a/far2l/src/message.cpp
+++ b/far2l/src/message.cpp
@@ -566,9 +566,16 @@ void GetMessagePosition(int &X1,int &Y1,int &X2,int &Y2)
Y2=MessageY2;
}
+static FARString s_ErrorString;
+
bool GetErrorString(FARString &strErrStr)
{
auto err = errno;
+ if (err == -1 && !s_ErrorString.IsEmpty()) {
+ strErrStr = s_ErrorString;
+ return true;
+ }
+
const char *str = strerror(err);
if (str) {
strErrStr.Format(L"%s (%u)", str, err);
@@ -578,6 +585,11 @@ bool GetErrorString(FARString &strErrStr)
return true;
}
+void SetErrorString(const FARString &strErrStr)
+{
+ s_ErrorString = strErrStr;
+ errno = -1;
+}
void SetMessageHelp(const wchar_t *Topic)
{