summaryrefslogtreecommitdiff
path: root/fs/expose/dokan
diff options
context:
space:
mode:
authorrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2010-10-12 22:07:40 +0000
committerrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2010-10-12 22:07:40 +0000
commit2a762e6561386409d2b8fb06d4a2bd4286bf5e28 (patch)
tree210a13c486b21d44b8137e5748137b3a099a1252 /fs/expose/dokan
parentf152c40169058be47d9c7688eb89c06486ba3bb0 (diff)
downloadpyfilesystem-2a762e6561386409d2b8fb06d4a2bd4286bf5e28.tar.gz
Fix various DAVFS issues from issue #40
* don't close the socket when handing off to RemoteFileBuffer * remove redundant check for "w" mode in the 404 case * properly close the socket in the isdir() case * add readline() method to RemoteFileBuffer git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@485 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/expose/dokan')
-rw-r--r--fs/expose/dokan/__init__.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/expose/dokan/__init__.py b/fs/expose/dokan/__init__.py
index afb916c..31aa3f0 100644
--- a/fs/expose/dokan/__init__.py
+++ b/fs/expose/dokan/__init__.py
@@ -170,7 +170,17 @@ def handle_fs_errors(func):
def timeout_protect(func):
- """Method decorator to enable timeout protection during call."""
+ """Method decorator to enable timeout protection during call.
+
+ During long-running operations, Dokan requires that the DokanResetTimeout
+ function be called periodically to indicate the progress is still being
+ made. Unfortunately we don't have an facility for the underlying FS
+ to make these calls for us, so we have to hack around it.
+
+ The idea is to use a single background thread to monitor all active Dokan
+ method calls, checking that they haven't deadlocked and resetting the
+ appropriate timeout.
+ """
@wraps(func)
def wrapper(self,*args):
info = args[-1]