mirror of
https://github.com/vgough/encfs.git
synced 2024-11-24 17:03:13 +01:00
Cygwin, unmount
This commit is contained in:
parent
e8e1dc3595
commit
1a8a5e0246
@ -81,6 +81,13 @@ else()
|
||||
set(DEFAULT_CASE_INSENSITIVE FALSE)
|
||||
endif()
|
||||
|
||||
if (CYGWIN)
|
||||
find_program(PKILL NAMES "pkill")
|
||||
if(NOT PKILL)
|
||||
message(FATAL_ERROR "pkill not found, please install procps-ng package.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check for FUSE.
|
||||
find_package (FUSE REQUIRED)
|
||||
include_directories (SYSTEM ${FUSE_INCLUDE_DIR})
|
||||
|
@ -1739,6 +1739,14 @@ void unmountFS(const char *mountPoint) {
|
||||
// fuse_unmount does not work on Mac OS, see #428
|
||||
unmount(mountPoint, MNT_FORCE);
|
||||
#endif
|
||||
#ifdef __CYGWIN__
|
||||
if(fork() == 0)
|
||||
{
|
||||
execl("/usr/bin/pkill", "/usr/bin/pkill", "-f", string("(^|/)encfs .*/.* ").append(mountPoint).append("?( |$)").c_str(), (char *)0);
|
||||
}
|
||||
int status;
|
||||
wait(&status);
|
||||
#endif
|
||||
}
|
||||
|
||||
int remountFS(EncFS_Context *ctx) {
|
||||
|
Loading…
Reference in New Issue
Block a user