mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
Cygwin, better handle read-only FS
This commit is contained in:
parent
980648c3b2
commit
dbfff030ce
@ -605,6 +605,14 @@ void *encfs_init(fuse_conn_info *conn) {
|
|||||||
// set fuse connection options
|
// set fuse connection options
|
||||||
conn->async_read = 1u;
|
conn->async_read = 1u;
|
||||||
|
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
// WinFsp needs this to partially handle read-only FS
|
||||||
|
// See https://github.com/billziss-gh/winfsp/issues/157 for details
|
||||||
|
if (ctx->opts->readOnly) {
|
||||||
|
conn->want |= (conn->capable & FSP_FUSE_CAP_READ_ONLY);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// if an idle timeout is specified, then setup a thread to monitor the
|
// if an idle timeout is specified, then setup a thread to monitor the
|
||||||
// filesystem.
|
// filesystem.
|
||||||
if (ctx->args->idleTimeout > 0) {
|
if (ctx->args->idleTimeout > 0) {
|
||||||
|
@ -329,7 +329,7 @@ sub links
|
|||||||
{
|
{
|
||||||
my $hardlinkTests = shift;
|
my $hardlinkTests = shift;
|
||||||
|
|
||||||
my $contents = "hello world\n";
|
my $contents = "hello world";
|
||||||
ok( open(OUT, "> $crypt/data"), "create file for link test" );
|
ok( open(OUT, "> $crypt/data"), "create file for link test" );
|
||||||
print OUT $contents;
|
print OUT $contents;
|
||||||
close OUT;
|
close OUT;
|
||||||
|
@ -141,7 +141,7 @@ sub symlink_test
|
|||||||
{
|
{
|
||||||
my $target = shift;
|
my $target = shift;
|
||||||
ok(symlink($target, "$plain/symlink"), "Symlink create, $plain/symlink -> $target");
|
ok(symlink($target, "$plain/symlink"), "Symlink create, $plain/symlink -> $target");
|
||||||
ok(my $dec = readlink("$decrypted/symlink"), "Symlink read, $decrypted/symlink");
|
ok(my $dec = readlink("$decrypted/symlink"), "Symlink read, $decrypted/symlink -> $target");
|
||||||
$dec.="";
|
$dec.="";
|
||||||
ok($dec eq $target, "Symlink compare, '$target' != '$dec'");
|
ok($dec eq $target, "Symlink compare, '$target' != '$dec'");
|
||||||
my $return_code = ($have_xattr) ? system(@binattr, "$decrypted/symlink") : 0;
|
my $return_code = ($have_xattr) ? system(@binattr, "$decrypted/symlink") : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user