Convert AS from filename correctly
@@ -102,7 +102,7 @@ func ProcessSelector(selector string) (map[addr.ISD][]addr.IA, error) {
}
func isdFromDir(dir string) (addr.ISD, error) {
- isd, err := addr.ISDFromString(filepath.Base(dir)[3:])
+ isd, err := addr.ISDFromFileFmt(filepath.Base(dir), true)
if err != nil {
return 0, common.NewBasicError("Unable to parse ISD number from dir", err, "dir", dir)
}
@@ -110,7 +110,7 @@ func isdFromDir(dir string) (addr.ISD, error) {
}
func asFromDir(dir string) (addr.AS, error) {
- as, err := addr.ASFromString(filepath.Base(dir)[2:])
+ as, err := addr.ASFromFileFmt(filepath.Base(dir), true)
if err != nil {
return 0, common.NewBasicError("Unable to parse AS number from dir", err, "dir", dir)
}
