mirror of
https://git.unlock-music.dev/um/cli.git
synced 2025-07-07 23:12:12 +08:00
fix #18: support upper case extension
This commit is contained in:
@ -76,8 +76,7 @@ func appMain(c *cli.Context) error {
|
||||
if inputStat.IsDir() {
|
||||
return dealDirectory(input, output)
|
||||
} else {
|
||||
ext := strings.TrimLeft(filepath.Ext(inputStat.Name()), ".")
|
||||
allDec := common.GetDecoder(ext)
|
||||
allDec := common.GetDecoder(inputStat.Name())
|
||||
if len(allDec) == 0 {
|
||||
logging.Log().Fatal("skipping while no suitable decoder")
|
||||
}
|
||||
@ -94,8 +93,7 @@ func dealDirectory(inputDir string, outputDir string) error {
|
||||
if item.IsDir() {
|
||||
continue
|
||||
}
|
||||
ext := strings.TrimLeft(filepath.Ext(item.Name()), ".")
|
||||
allDec := common.GetDecoder(ext)
|
||||
allDec := common.GetDecoder(item.Name())
|
||||
if len(allDec) == 0 {
|
||||
logging.Log().Info("skipping while no suitable decoder", zap.String("file", item.Name()))
|
||||
continue
|
||||
|
Reference in New Issue
Block a user