From 5fb117cc51ff63f8e5b1a5744711ed928194e49b Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Wed, 11 May 2022 12:28:11 +0100 Subject: [PATCH] improvement: +x not u+x --- pamupdatemanager/pamupdatemanagerMain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pamupdatemanager/pamupdatemanagerMain.cpp b/pamupdatemanager/pamupdatemanagerMain.cpp index 8a99abe6..3053eef4 100644 --- a/pamupdatemanager/pamupdatemanagerMain.cpp +++ b/pamupdatemanager/pamupdatemanagerMain.cpp @@ -426,6 +426,7 @@ bool pamupdatemanagerDialog::ReplaceFileUsr(wxDC& dc, wxTarInputStream& input, c } } + wxString sTemp = "/tmp/"+fnOutput.GetFullName(); wxFileOutputStream out(sTemp); if(out.IsOk()) @@ -436,7 +437,7 @@ bool pamupdatemanagerDialog::ReplaceFileUsr(wxDC& dc, wxTarInputStream& input, c input.Read(out); } auto nResult = wxExecute(wxString::Format("sh -c \"echo %s | sudo -S -k mv %s %s\"", m_pedtPassword->GetValue().c_str(), sTemp.c_str(), fnOutput.GetFullPath().c_str()), wxEXEC_SYNC); - nResult += wxExecute(wxString::Format("sh -c \"echo %s | sudo -S -k chmod u+x %s\"", m_pedtPassword->GetValue().c_str(), fnOutput.GetFullPath().c_str()), wxEXEC_SYNC); + nResult += wxExecute(wxString::Format("sh -c \"echo %s | sudo -S -k chmod +x %s\"", m_pedtPassword->GetValue().c_str(), fnOutput.GetFullPath().c_str()), wxEXEC_SYNC); if(nResult == 0) { m_setUpdated.insert(fnOutput.GetFullPath()+".bak");