From 66c41031306d5397d148273fe2a316bd4e4a44f7 Mon Sep 17 00:00:00 2001 From: takayama Date: Sat, 4 Dec 2021 17:50:57 +0900 Subject: [PATCH] fix gfs --- lib/gfs.ts | 7 +++++-- package.json | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/gfs.ts b/lib/gfs.ts index a13f6275..270bdc51 100644 --- a/lib/gfs.ts +++ b/lib/gfs.ts @@ -38,7 +38,7 @@ export interface GfsDirStat extends GfsBaseStat { } function checkRsp(rsp: pb.Proto) { - if (rsp[1] === 0) return + if (!rsp[1]) return drop(rsp[1], rsp[2]) } @@ -58,7 +58,10 @@ export class Gfs { return this.c } - constructor(private c: Client, public readonly gid: number) { } + constructor(private readonly c: Client, public readonly gid: number) { + common.lock(this, "c") + common.lock(this, "gid") + } /** 获取使用空间和文件数 */ async df() { diff --git a/package.json b/package.json index 8e535edb..0a6e1895 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "oicq", - "version": "2.1.4", - "upday": "2021/11/07", + "version": "2.1.5", + "upday": "2021/12/04", "description": "QQ protocol!", "main": "lib/index.js", "types": "lib/index.d.ts",