(This post is a repost for http://thetinybit.com/Blog/2008-06-02 [not accessible])
Yesterday I saw a conversation on FriendFeed, that is about migrating photo from Picasaweb to Flickr. I don't have such need, but I immediately had an idea by using PicasaFS and FlickrFS. Before that, I had never tried out PicasaFS and FlickrFS. FlickrFS has a bug that makes me can't have
The cause is:
When
I still don't know how to ask fuse running in foreground like PicasaFS does.
The patch for CVS:
This patch actually is one line only.
The versions of softwares I used:
Yesterday I saw a conversation on FriendFeed, that is about migrating photo from Picasaweb to Flickr. I don't have such need, but I immediately had an idea by using PicasaFS and FlickrFS. Before that, I had never tried out PicasaFS and FlickrFS. FlickrFS has a bug that makes me can't have
/sets
in FuseFS. After searching for hours, the resolution is extremely simple. The cause is:
When
Fuse.main()
invoked, the process goes into daemon mode. Threads would be ended if there are some created before. The correct way to create threads is to add fsinit()
(See this post) method in your fuse class, then create threads in that method. The fuse FAQ also mentions this issue. I still don't know how to ask fuse running in foreground like PicasaFS does.
The patch for CVS:
Index: flickrfs.py
===================================================================
RCS file: /cvsroot/flickrfs/flickrfs/flickrfs/flickrfs.py,v
retrieving revision 1.9
diff -u -r1.9 flickrfs.py
--- flickrfs.py 31 Jan 2008 19:32:33 -0000 1.9
+++ flickrfs.py 1 Jun 2008 23:49:45 -0000
@@ -206,6 +206,9 @@
self._mkdir("/tags")
self._mkdir("/tags/personal")
self._mkdir("/tags/public")
+
+
+ def fsinit(self):
background(timerThread, self.sets_thread,
self.sync_sets_thread, sets_sync_int) #sync every 2 minutes
This patch actually is one line only.
The versions of softwares I used:
- flickrfs 1.3.9 and cvs (retrieved on 2008-06-01)
- fuse 2.7.3
- fuse-python 0.2.8
- Imagemagick 6.3.8.1
- python 2.5.1
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.