tankwyn / WPS-Zotero

An add-on for WPS Writer to integrate with Zotero.
GNU General Public License v3.0
179 stars 13 forks source link

日志的存储路径总是d:\\fuck.log #20

Closed Morgal106 closed 8 months ago

Morgal106 commented 8 months ago

每次我打开一个word文档时总会在文件路径新建一个d:\fuck.log文件 我在仓库中搜索fuck.log时,发现在proxy.py中

def main(argv):
    # Configure logging
    if os.name == 'posix':
        logfile = os.environ['HOME'] + '/.wps-zotero-proxy.log'
    else:
        logfile = os.environ['APPDATA'] + '\\kingsoft\\wps\\jsaddons\\wps-zotero-proxy.log'
    logfile = 'd:\\fuck.log'   # 无论如何日志文件名总是fuck.log
    if os.path.exists(logfile) and os.path.getsize(logfile) > 100 * 1024:
        os.remove(logfile)
tankwyn commented 8 months ago

调试时写的忘删了,已修正