You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
panic: open ./warcs/VIDEO-20250130132906660-00005-crawler01.warc.gz.open: no such file or directory
goroutine 32124 [running]:
github.com/CorentinB/warc.isFileSizeExceeded({0xc16c7faf40?, 0xc046388be0?}, 0x408f400000000000)
/root/go/pkg/mod/github.com/!corentin!b/[email protected]/utils.go:284 +0xf5
github.com/CorentinB/warc.recordWriter(0xc04ce75440, 0xc04a67f7a0, 0xc041956a80, 0xc046388bf0)
/root/go/pkg/mod/github.com/!corentin!b/[email protected]/warc.go:148 +0x559
created by github.com/CorentinB/warc.(*RotatorSettings).NewWARCRotator in goroutine 1
/root/go/pkg/mod/github.com/!corentin!b/[email protected]/warc.go:72 +0x8a```
The text was updated successfully, but these errors were encountered:
I suggest the following solution:
Pass the file path instead of *os.File. This ensures the function operates on a fresh file descriptor each time, reducing potential race conditions.
Also, very important: before checking the file path, check if the file exists. If not, just return false
I suggest the following solution: Pass the file path instead of *os.File. This ensures the function operates on a fresh file descriptor each time, reducing potential race conditions. Also, very important: before checking the file path, check if the file exists. If not, just return false
The problem with that is that it makes the lib open and close files, A LOT. If we keep and os.File and don't have this problem, it avoids that, there shouldn't be a race even with os.File.. :(
The text was updated successfully, but these errors were encountered: