Merge pull request #21 from rumanzo/issue20

Detect abs paths for windows fileshare
This commit is contained in:
Alexey Kostin 2020-10-26 23:18:41 +03:00 committed by GitHub
commit 991ae93120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,7 @@ func logic(key string, value map[string]interface{}, flags *Flags, chans *Channe
Separator: flags.PathSeparator, Separator: flags.PathSeparator,
} }
if isAbs, _ := regexp.MatchString(`^[A-Z]:\\`, key); isAbs == true { if isAbs, _ := regexp.MatchString(`^([A-Z]:)?,\\`, key); isAbs == true {
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
newstructure.TorrentFilePath = key newstructure.TorrentFilePath = key
} else { // for unix system find in search paths } else { // for unix system find in search paths