mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 11:59:48 -04:00
Tweak dwarfs_tools test
This commit is contained in:
parent
62d8bd8f38
commit
12080954e0
@ -35,9 +35,10 @@
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <folly/portability/Unistd.h>
|
||||
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/process.hpp>
|
||||
|
||||
@ -350,15 +351,11 @@ bool check_readonly(fs::path const& p, bool readonly = false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// TODO
|
||||
#else
|
||||
if (::access(p.c_str(), W_OK) == 0) {
|
||||
if (::access(p.string().c_str(), W_OK) == 0) {
|
||||
// access(W_OK) should never succeed
|
||||
::perror("access");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user