mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
This commit is contained in:
parent
8593247172
commit
6fa661982d
@ -48,7 +48,7 @@ func AddFlashcard(blockID string, deckName string) (err error) {
|
||||
}
|
||||
|
||||
func InitFlashcards() {
|
||||
riffSavePath := filepath.Join(util.DataDir, "storage", "riff")
|
||||
riffSavePath := getRiffDir()
|
||||
if !gulu.File.IsDir(riffSavePath) {
|
||||
return
|
||||
}
|
||||
@ -78,7 +78,7 @@ func InitFlashcards() {
|
||||
}
|
||||
|
||||
func CreateDeck(name string) (err error) {
|
||||
riffSavePath := filepath.Join(util.DataDir, "storage", "riff")
|
||||
riffSavePath := getRiffDir()
|
||||
deck, err := riff.LoadDeck(riffSavePath, name, riff.AlgoFSRS)
|
||||
if nil != err {
|
||||
logging.LogErrorf("load deck [%s] failed: %s", name, err)
|
||||
@ -103,3 +103,7 @@ func SaveDeck(name string) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getRiffDir() string {
|
||||
return filepath.Join(util.DataDir, "storage", "riff")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user