Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

一个找config.json文件的小bug #425

Open
afwerar opened this issue Aug 18, 2018 · 1 comment
Open

一个找config.json文件的小bug #425

afwerar opened this issue Aug 18, 2018 · 1 comment

Comments

@afwerar
Copy link

afwerar commented Aug 18, 2018

cmd\shadowsocks-server\server.go:441:"if !os.IsNotExist(err)" should be "if os.IsNotExist(err)"
cmd\shadowsocks-local\local.go:382:"if (!exists || err != nil) && binDir != "" && binDir != "."" should be "if !exists || err != nil"

@k1988
Copy link

k1988 commented Jan 3, 2020

这个是你代码理解错误了。你以为这个判断是文件不存在时报错,其实是文件存在但读取失败时报错(未预期的异常情况)。文件不存在走使用命令行中的配置(预期的异常情况)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants