Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e25c78b547
2 changed files with 2 additions and 4 deletions
|
@ -82,10 +82,6 @@ try {
|
|||
if (!fs.existsSync(confDir)) {
|
||||
fs.mkdirSync(confDir, {mode: 0o755, recursive: true})
|
||||
}
|
||||
const documents = path.join(app.getPath('home'), 'Documents')
|
||||
if (!fs.existsSync(documents)) {
|
||||
fs.mkdirSync(documents, {mode: 0o755, recursive: true})
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
require('electron').dialog.showErrorBox('创建配置目录失败 Failed to create config directory',
|
||||
|
|
|
@ -59,6 +59,8 @@ func RenderCreateDocNameTemplate(nameTemplate string) (ret string, err error) {
|
|||
}
|
||||
|
||||
func SearchTemplate(keyword string) (ret []*Block) {
|
||||
ret = []*Block{}
|
||||
|
||||
templates := filepath.Join(util.DataDir, "templates")
|
||||
k := strings.ToLower(keyword)
|
||||
filepath.Walk(templates, func(path string, info fs.FileInfo, err error) error {
|
||||
|
|
Loading…
Add table
Reference in a new issue