22 lines
804 B
Text
22 lines
804 B
Text
No euidaccess on OpenBSD
|
|
|
|
Index: app/RestoreFileTester.vala
|
|
--- app/RestoreFileTester.vala.orig
|
|
+++ app/RestoreFileTester.vala
|
|
@@ -75,12 +75,12 @@ public class RestoreFileTester : Object
|
|
// a file in it. But testing write access is probably good enough for now.
|
|
exists = false;
|
|
string iter = path;
|
|
- int access = -1;
|
|
- while (access != 0 && Posix.errno == Posix.ENOENT) {
|
|
+ int has_access = -1;
|
|
+ while (has_access != 0 && Posix.errno == Posix.ENOENT) {
|
|
iter = Path.get_dirname(iter);
|
|
- access = Posix.euidaccess(iter, Posix.W_OK | Posix.X_OK);
|
|
+ has_access = Posix.access(iter, Posix.W_OK | Posix.X_OK);
|
|
}
|
|
- if (access != 0)
|
|
+ if (has_access != 0)
|
|
return false;
|
|
}
|
|
} else {
|