bugfix
This commit is contained in:
parent
9b0ce166b6
commit
813887e65b
@ -21,7 +21,7 @@ def get_dbname():
|
|||||||
return dbname
|
return dbname
|
||||||
|
|
||||||
class FileMgr:
|
class FileMgr:
|
||||||
async def add_file(request, params_kw):
|
async def add_file(self, request, params_kw):
|
||||||
fs = FileStorage()
|
fs = FileStorage()
|
||||||
webpath = params_kw.upfile
|
webpath = params_kw.upfile
|
||||||
realpath = fs.realpath(wwebpath)
|
realpath = fs.realpath(wwebpath)
|
||||||
@ -53,7 +53,7 @@ class FileMgr:
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
async def del_file(request, fid):
|
async def del_file(self, request, fid):
|
||||||
db = DBPools()
|
db = DBPools()
|
||||||
dbname = get_dbname()
|
dbname = get_dbname()
|
||||||
async with db.sqlorContext(dbname) as sor:
|
async with db.sqlorContext(dbname) as sor:
|
||||||
@ -65,7 +65,7 @@ class FileMgr:
|
|||||||
if not remain:
|
if not remain:
|
||||||
os.unlink(delrec.realpath)
|
os.unlink(delrec.realpath)
|
||||||
|
|
||||||
async def has_sub(request, sor, folderid):
|
async def has_sub(self, request, sor, folderid):
|
||||||
sql = """select unique a.* from folder a
|
sql = """select unique a.* from folder a
|
||||||
left join folder b on a.id = b.parentid
|
left join folder b on a.id = b.parentid
|
||||||
left join file c on a.id=c.folderid
|
left join file c on a.id=c.folderid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user