-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows Filename is throwing dbase-io-windows-findfile-1 #103
Comments
Can you please provide me the error string after dbase.Debug(true, os.Stdout) |
Thanks for looking at it already. Just tested on a windows 11 machine and there it works. Will test tomorrow using the win 10 machine again and report here again. |
Any news on this? |
I hope the problem has been solved. I will close the issue for now due to lack of response. If it still exists please open it again. |
I have tested it again: windows 11 works, but 10 does not. The complete error is: |
Also tried |
What's the reason for the |
The The interesting thing is that it already fails when reading the directory: files, err := os.ReadDir(filepath.Dir(name))
if err != nil {
return "", newError("dbase-io-windows-findfile-1", err)
} Can you please test the following code? configPath := "Y://somefolder"
p := filepath.Join(configPath, "daten", "mytable.DBF")
files, err := os.ReadDir(filepath.Dir(p))
if err != nil {
panic(err)
} |
I tried to reproduce this issue but did not run into any error. I tried to be as close as possible to the given setup:
My code: package main
import (
"fmt"
"path/filepath"
"github.com/Valentin-Kaiser/go-dbase/dbase"
)
func main() {
configPath := "U:\\Anwendungsentwicklung\\Database Folder\\Company"
p := filepath.Join(configPath, "Backup Version", "table.dbf")
fmt.Printf("Opening table %v\n", p)
table, err := dbase.OpenTable(&dbase.Config{
Filename: p,
TrimSpaces: true,
})
if err != nil {
panic(dbase.GetErrorTrace(err))
}
defer table.Close()
fmt.Printf("Table: %v\n", table.TableName())
} Things to consider:
|
Thanks for having a look again, I will do some further testing and report back. (might take a bit as I normally only have access to the systems on working days) |
Any news on this? |
Took me quite some time to figure out. Actually it seems the path does simply not exist for the admin account, but for the normal user. Thanks for the help and sorry for stealing your time 🙈 |
Describe the bug
On windows my file isn't recognized and throwing
dbase-io-windows-findfile-1
. My code usesfilepath.Join(pi.Config.DBPath, 'daten', 'my-table.DBF')
which works on my linux clients. However on windows the path with the config prefix does not work. I printed the pathY:\some-folder\daten\my-table.DBF
already and checked if it exists by entering it towin+r
and everything worked as expected. I am a bit lost where the issue could come from.To Reproduce
Example code to reproduce the behavior:
Expected behavior
It should find the file 😅
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Related code part should be the call of
os.ReadDir(filepath.Dir(name))
ingo-dbase/dbase/io_windows.go
Line 788 in e80f581
The text was updated successfully, but these errors were encountered: