[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2390: drop-upload on Windows: can't tolerate creation of a directory under the watched directory

Tahoe-LAFS trac at tahoe-lafs.org
Wed Mar 18 00:45:23 UTC 2015


#2390: drop-upload on Windows: can't tolerate creation of a directory under the
watched directory
-------------------------------------+-------------------------------------
     Reporter:  daira                |      Owner:  daira
         Type:  defect               |     Status:  assigned
     Priority:  major                |  Milestone:  1.11.0
    Component:  code-frontend-drop-  |    Version:  1.10.0
  upload                             |   Keywords:  drop-upload otf-magic-
   Resolution:                       |  folder windows error
Launchpad Bug:                       |
-------------------------------------+-------------------------------------
Changes (by daira):

 * status:  new => assigned


Old description:

> {{{
> }}}

New description:

 {{{
 [ERROR]
 Traceback (most recent call last):
   File "c:\tahoe\git\tahoe-magic\src\allmydata\frontends\drop_upload.py",
 line 93, in _add_file
     u = FileName(path.path, self._convergence)
   File "c:\tahoe\git\tahoe-magic\src\allmydata\immutable\upload.py", line
 1482, in __init__
     FileHandle.__init__(self, open(filename, "rb"),
 convergence=convergence)
 exceptions.IOError: [Errno 13] Permission denied: u'\\\\?\\C:\\tahoe\\git
 \\tahoe-magic\\_trial_temp-
 1\\drop_upload.RealTest.test_drop_upload\\loc\u0101l_dir\\directory'

 allmydata.test.test_drop_upload.RealTest.test_drop_upload
 }}}

 This failure happens only if [https://github.com/tahoe-lafs/tahoe-
 lafs/blob/3fb9fa967ad59ff520a8e5fe2b4ee8a667b49219/src/allmydata/test/test_drop_upload.py#L57
 this code] is included in `DropUploadTestMixin._test`:

 {{{
     # Test that we tolerate creation of a subdirectory.
     d.addCallback(lambda ign: os.mkdir(os.path.join(self.local_dir,
 u"directory")))
 }}}

 The problem is that on Windows, `DropUploader._process` is called for
 changes to directories as well as files (because `ReadDirectoryChangesW`
 makes no distinction between them). So, in [https://github.com/tahoe-lafs
 /tahoe-
 lafs/blob/3fb9fa967ad59ff520a8e5fe2b4ee8a667b49219/src/allmydata/frontends/drop_upload.py#L93
 this code]:
 {{{
     u = FileName(path.path, self._convergence)
     return self._parent.add_file(name, u)
 }}}
 `path.path` will be the path of a directory, which causes a permission
 error when it is opened for reading as though it were a file.

--

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2390#comment:1>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list