Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增node download下的下载判断以及中文路径错误的修正 #106

Merged
merged 3 commits into from
Oct 23, 2022

Conversation

lihengdao666
Copy link
Contributor

@lihengdao666 lihengdao666 commented Oct 22, 2022

在window环境测试发现npm run download下载后运行会发生
Emitted 'error' event on Database instance at:
] {
errno: 1,
code: 'SQLITE_ERROR'
}
经过研究发现是下载路径的问题,于是尝试新增了一小段判断环境并且下载win x86/64的小代码


根据测试在window环境下如果存在中文目录
会出现错误
2022-10-22 23:51:12 D:\a_temp\windows\cppjieba\src\cppjieba\include\cppjieba\DictTrie.hpp:203 FATAL exp: [ifs.is_open()] false. open C:\Users\lihengdao\Desktop\github椤圭洰\sqlite\simple\examples\node\lib\dict\jieba.dict.utf8 failed.
尝试修改
node-sqlite3.js文件中的
var dict_path = path.join(ext_path, "dict");

var dict_path = "./lib/dict";
问题得到解决
但是其他环境下没有确定是否也存在该问题以及能否正常运行


个人开发能力不强
斗胆尝试提交一下
多有冒犯
希望大佬不要介意

@codecov
Copy link

codecov bot commented Oct 22, 2022

Codecov Report

Merging #106 (e9f6e17) into master (a2388ab) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #106   +/-   ##
=======================================
  Coverage   95.77%   95.77%           
=======================================
  Files           3        3           
  Lines         213      213           
=======================================
  Hits          204      204           
  Misses          9        9           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@wangfenjin wangfenjin merged commit 834b512 into wangfenjin:master Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants