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