]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
WIP
authorDavid Stainton <dstainton415@gmail.com>
Mon, 1 Jun 2015 16:19:42 +0000 (09:19 -0700)
committerDavid Stainton <dstainton415@gmail.com>
Mon, 1 Jun 2015 16:19:42 +0000 (09:19 -0700)
src/allmydata/frontends/drop_upload.py
src/allmydata/test/test_drop_upload.py

index 815c5084d6aa642746c83f4740fd76f2a4114743..ee9e5783077ecfccc38baf9a6a2e055b206b3327 100644 (file)
@@ -93,6 +93,7 @@ class DropUploader(service.MultiService):
         #self.mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_ONLYDIR
         #self.mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_MOVED_FROM | inotify.IN_ONLYDIR | IN_EXCL_UNLINK
         self.mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_ONLYDIR | IN_EXCL_UNLINK | inotify.IN_DELETE
+        #self.mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_ONLYDIR | IN_EXCL_UNLINK
         self._notifier.watch(self._local_path, mask=self.mask, callbacks=[self._notify],
                              recursive=True)
 
@@ -204,7 +205,10 @@ class DropUploader(service.MultiService):
             return self._parent.add_file(name, u)
 
         def _add_dir(ignore, name):
-            self._notifier.watch(to_filepath(path), mask=self.mask, callbacks=[self._notify], recursive=True)
+            # XXX
+            #self._notifier.watch(to_filepath(path), mask=self.mask, callbacks=[self._notify], recursive=True)
+            print name
+            print self._local_dir
             d2 = self._parent.create_subdirectory(name, overwrite=False)
             def _err(f):
                 f.trap(ExistingChildError)
@@ -296,4 +300,5 @@ class DropUploader(service.MultiService):
 
     def _log(self, msg):
         self._client.log(msg)
+        print "_log:", msg
         #open("events", "ab+").write(msg)
index 631136eeba545ad1243baca442ddac44278d1acd..1455ccc7be38038af8715188a980c2f13fa1da93 100644 (file)
@@ -275,7 +275,7 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.directories_created'), 1))
         d.addBoth(self._cleanup)
         return d
-        
+
     def test_drop_upload(self):
         self.set_up_grid()
         self.local_dir = os.path.join(self.basedir, self.unicode_or_fallback(u"loc\u0101l_dir", u"local_dir"))