diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index f35731d3f3..12f1ef139f 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -597,11 +597,15 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept) // Move the appimage/exe and replace with new appimage const std::string move_dest = replace_path + "_old"; - fs::rename(replace_path, move_dest, true); + if (!fs::rename(replace_path, move_dest, true)) + { + // Simply log error for now + update_log.error("Failed to move old AppImage file: %s (%s)", replace_path, fs::g_tls_error); + } fs::file new_appimage(replace_path, fs::read + fs::write + fs::create + fs::trunc); if (!new_appimage) { - update_log.error("Failed to create new AppImage file: %s", replace_path); + update_log.error("Failed to create new AppImage file: %s (%s)", replace_path, fs::g_tls_error); return false; } if (new_appimage.write(data.data(), data.size()) != data.size() + 0u) @@ -611,7 +615,7 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept) } if (fchmod(new_appimage.get_handle(), S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == -1) { - update_log.error("Failed to chmod rwxrxrx %s", replace_path); + update_log.error("Failed to chmod rwxrxrx %s (%s)", replace_path, strerror(errno)); return false; } new_appimage.close();