summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/opie-login/passworddialogimpl.cpp6
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp11
2 files changed, 14 insertions, 3 deletions
diff --git a/core/opie-login/passworddialogimpl.cpp b/core/opie-login/passworddialogimpl.cpp
index d9132e2..3c1b474 100644
--- a/core/opie-login/passworddialogimpl.cpp
+++ b/core/opie-login/passworddialogimpl.cpp
@@ -166,3 +166,7 @@ void PasswordDialogImpl::writePassword() {
::endpwent();
- ::rename("/etc/passwd.new","/etc/passwd" );
+ if (::rename("/etc/passwd.new","/etc/passwd" ) == -1)
+ return error( tr("Rename /etc/passwd failed"),
+ tr("<qt>Renaming /etc/passwd.new to /etc/passwd failed."
+ "Please check your /etc/passed file, your /etc directory "
+ "or your filesystem.</qt>") );
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp
index dd9e78d..c5c6387 100644
--- a/noncore/settings/aqpkg/ipkg.cpp
+++ b/noncore/settings/aqpkg/ipkg.cpp
@@ -211,3 +211,3 @@ void Ipkg :: removeStatusEntry()
{
- tempstr = tr("Couldn't create tempory status file - ");
+ tempstr = tr("Couldn't create temporary status file - ");
tempstr.append( outStatusFile );
@@ -272,3 +272,10 @@ void Ipkg :: removeStatusEntry()
remove( statusFile );
- rename( outStatusFile, statusFile );
+ if (::rename( outStatusFile, statusFile ) == -1)
+ {
+ tempstr = tr("Couldn't rename temporary status file - ");
+ tempstr.append( outStatusFile );
+ tempstr.append( tr("to status file - ") );
+ tempstr.append( statusFile );
+ emit outputText( tempstr );
+ }
}