Commit ad01d4b6 authored by Jim Fulton's avatar Jim Fulton

Changed db_size to allow string sizes, for storages that don't

measure size in bytes.
parent 793edb8b
......@@ -83,7 +83,7 @@
#
##############################################################################
__doc__="""System management components"""
__version__='$Revision: 1.61 $'[11:-2]
__version__='$Revision: 1.62 $'[11:-2]
import sys,os,time,string,Globals, Acquisition, os, Undo
......@@ -358,7 +358,8 @@ class ApplicationManager(Folder,CacheManager):
s=os.stat(self.db_name())[6]
else:
s=self._p_jar.db().getSize()
if type(s) is type(''): return s
if s >= 1048576.0: return '%.1fM' % (s/1048576.0)
return '%.1fK' % (s/1024.0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment