dutchcoders / dutchcoders/goftp
"File not found"
- Dominant language
- Go
- Stars
- 280
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
```
fmt.Println("Current path:", curpath)
var innerfiles []string
if innerfiles, err = ftp.List(""); err != nil {
panic(err)
}
```
returns:
Current path: /40610
[Size=501214;Modify=20151215133602.000;Type=file; 40610_3286561_68607792_cmp.xml.gz
Size=49742;Modify=20151215133602.000;Type=file; 40610_3286561_68607792_cmp_delta.xml.gz
Size=49742;Modify=20151215133602.000;Type=file; 40610_3286561_68607792_cmp_deltatemplate.txt.gz
Size=501214;Modify=20151215133602.000;Type=file; 40610_3286561_68607792_cmp_template.txt.gz
Size=42;Modify=20151215133602.000;Type=file; 40610_category_list.txt
]
```
filename := strings.TrimSpace(strings.Split(innerfiles[0], ";")[3])
```
== 40610_3286561_68607792_cmp.xml.gz
```
var file *os.File
if file, err = os.Open(curpath + "/" + filename); err != nil {
panic(err)
}
```
panic: open /40610/40610_3286561_68607792_cmp.xml.gz: no such file or directory
despite listing all the correct files, accessing the correct directory and the file existing, i am told it cannot open a non existent file? What's happening here?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.