Compare commits

...

4 Commits

Author SHA1 Message Date
MatthewBiskas 7c88027f2b
Merge e9ce1d99fe into 0a0f99dd1b 2024-09-18 19:08:18 +02:00
Matthew e9ce1d99fe language 2024-09-17 12:51:00 +02:00
Matthew 421be5b01f Added permissions check 2024-09-17 03:21:27 +02:00
Matthew 8e85eff13e prevent
curl: (33) HTTP server does not seem to support byte ranges. Cannot resume.
2024-09-17 02:18:51 +02:00
2 changed files with 15 additions and 1 deletions

View File

@ -51,7 +51,7 @@ aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslan
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
EOF
curl -C - -L \
curl -L \
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
-O "https://ijg.org/files/jpegsrc.v$LIBJPEG.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \

View File

@ -11,6 +11,8 @@
#include "common/Path.h"
#include "common/StringUtil.h"
#include <unistd.h>
MemoryCardConvertDialog::MemoryCardConvertDialog(QWidget* parent, QString selectedCard)
: QDialog(parent)
{
@ -254,6 +256,18 @@ void MemoryCardConvertDialog::ConvertCard()
QString destName = baseName;
destName.append(".ps2");
QString fullPath = Path::Combine(EmuFolders::MemoryCards, destName.toStdString()).c_str();
QDir destinationDir(fullPath);
QString absolutePath = destinationDir.absolutePath(); // Get the absolute path
if (access(absolutePath.toStdString().c_str(), R_OK | W_OK | X_OK) != 0)
{
QMessageBox::critical(this, tr("Cannot Convert Memory Card"),
tr("You have insufficient permissions to convert this Memory Card. Please ensure that your user owns the directory of your Memory Cards. \n \"%1\".")
.arg(absolutePath));
return;
}
// If a match is found, revert back to the base name, add a number and the extension, and try again.
// Keep incrementing the number until we get a unique result.
while (m_srcCardInfo.type == MemoryCardType::File ? FileSystem::DirectoryExists(Path::Combine(EmuFolders::MemoryCards, destName.toStdString()).c_str()) : FileSystem::FileExists(Path::Combine(EmuFolders::MemoryCards, destName.toStdString()).c_str()))