File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -76,5 +76,20 @@ type Resource struct {
7676 * FileInfo
7777}
7878func (r Resource ) getFileName () string {
79- return fmt .Sprintf ("%s.%s" , r .metaId , r .metaFileExt )
79+ var fileName string
80+ if /*len(r.metaFileExt) > 0*/ false {
81+ fileName = fmt .Sprintf ("%s.%s" , r .metaId , r .metaFileExt )
82+ } else {
83+ resPath := path .Join (* SrcPath , "resources" )
84+ c , err := ioutil .ReadDir (resPath )
85+ CheckError (err )
86+ for _ , entry := range c {
87+ if entry .IsDir () {continue }
88+ if strings .Index (entry .Name (), r .metaId ) >= 0 {
89+ fileName = entry .Name ()
90+ break
91+ }
92+ }
93+ }
94+ return fileName
8095}
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ func main() {
6565 }()
6666
6767 <- done
68- fmt .Println ("\n \n Done!\n " )
68+ fmt .Printf ("\n \n Done!\n \n " )
6969 fmt .Println (fmt .Sprintf ("The next step is to open %s as vault in Obsidian, Then you will see what you want to see." , * DestPath ))
7070
7171}
You can’t perform that action at this time.
0 commit comments