elif os.path.isfile(childpath) and not os.path.islink(childpath):
must_upload = self._check_db_file(childpath)
if must_upload:
-- self._add_to_dequeue(childpath)
++ self._append_to_deque(self._process, childpath, None) # XXX which event mask?
else:
if os.path.islink(childpath):
self.warn("WARNING: cannot backup symlink %s" % quote_local_unicode_path(childpath))
DropUploader, client, upload_dircap, '\xFF', 'magicfolderdb', inotify=fake_inotify)
self.shouldFail(AssertionError, 'nonexistent local.directory', 'there is no directory',
DropUploader, client, upload_dircap, os.path.join(self.basedir, "Laputa"), 'magicfolderdb', inotify=fake_inotify)
--
- fp = filepath.FilePath(self.basedir).child('NOT_A_DIR')
- fp.touch()
self.shouldFail(AssertionError, 'non-directory local.directory', 'is not a directory',
- DropUploader, client, upload_dircap, fp.path, 'magicfolderdb', inotify=fake_inotify)
-
+ DropUploader, client, upload_dircap, not_a_dir, 'magicfolderdb', inotify=fake_inotify)
-
self.shouldFail(AssertionError, 'bad upload.dircap', 'does not refer to a directory',
DropUploader, client, 'bad', errors_dir, 'magicfolderdb', inotify=fake_inotify)
self.shouldFail(AssertionError, 'non-directory upload.dircap', 'does not refer to a directory',