Author: dmeyer
Date: Tue Oct 24 18:56:49 2006
New Revision: 1928

Modified:
   trunk/beacon/src/db.py

Log:
handle / for queries

Modified: trunk/beacon/src/db.py
==============================================================================
--- trunk/beacon/src/db.py      (original)
+++ trunk/beacon/src/db.py      Tue Oct 24 18:56:49 2006
@@ -149,6 +149,8 @@
         # do query based on type
         if 'dirname' in query:
             query['dirname'] = os.path.realpath(query['dirname'] + '/')
+            if query['dirname'] == '//':
+                query['dirname'] = '/'
             return self._db_query_dirname(query)
         if 'filename' in query and qlen == 1:
             fname = os.path.realpath(query['filename'])
@@ -347,7 +349,9 @@
         m = medialist.mountpoint(filename)
         if not m:
             raise AttributeError('mountpoint not found')
-        if os.path.isdir(filename) and not m == medialist.mountpoint(dirname):
+
+        if (os.path.isdir(filename) and m != medialist.mountpoint(dirname)) \
+           or filename == '/':
             # the filename is the mountpoint itself
             e = self._db.query(parent=m._beacon_id, name='')
             return create_file(e[0], m, isdir=True)

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to