Opened at 2015-03-17T23:52:14Z
Last modified at 2016-03-22T05:02:52Z
#2390 closed defect
drop-upload on Windows: can't tolerate creation of a directory under the watched directory — at Version 1
Reported by: | daira | Owned by: | daira |
---|---|---|---|
Priority: | major | Milestone: | 1.12.0 |
Component: | code-frontend-magic-folder | Version: | 1.10.0 |
Keywords: | drop-upload otf-magic-folder-objective4 windows error | Cc: | |
Launchpad Bug: |
Description (last modified by daira)
[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 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 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.
Change History (1)
comment:1 Changed at 2015-03-18T00:45:23Z by daira
- Description modified (diff)
- Status changed from new to assigned
Note: See
TracTickets for help on using
tickets.