mirror of https://github.com/PCSX2/pcsx2.git
Changes to work for windows + linux
This commit is contained in:
parent
06513d81f8
commit
6e3e2400fb
|
@ -277,7 +277,7 @@ void MemoryCardConvertDialog::ConvertCard()
|
||||||
|
|
||||||
// Windows has no direct R/W/X permission model like Linux. We check for basic file existence.
|
// Windows has no direct R/W/X permission model like Linux. We check for basic file existence.
|
||||||
bool canRead = !(fileAttributes & FILE_ATTRIBUTE_READONLY);
|
bool canRead = !(fileAttributes & FILE_ATTRIBUTE_READONLY);
|
||||||
bool canWrite = true; // If not read-only, assume write is possible (for this basic example)
|
bool canWrite = true; // If not read-only, assume write is possible.
|
||||||
|
|
||||||
if !(canRead && canWrite)
|
if !(canRead && canWrite)
|
||||||
{
|
{
|
||||||
|
@ -286,7 +286,7 @@ void MemoryCardConvertDialog::ConvertCard()
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// Linux/Unix code using access() for checking R/W/X permissions
|
// Linux/Unix systems
|
||||||
if (access(dirPath.toStdString().c_str(), R_OK | W_OK | X_OK) != 0)
|
if (access(dirPath.toStdString().c_str(), R_OK | W_OK | X_OK) != 0)
|
||||||
{
|
{
|
||||||
PermissionError(absolutePath);
|
PermissionError(absolutePath);
|
||||||
|
|
Loading…
Reference in New Issue