mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 03:42:25 -05:00 
			
		
		
		
	[chore]: Bump github.com/tetratelabs/wazero from 1.8.2 to 1.9.0 (#3827)
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.8.2 to 1.9.0. - [Release notes](https://github.com/tetratelabs/wazero/releases) - [Commits](https://github.com/tetratelabs/wazero/compare/v1.8.2...v1.9.0) --- updated-dependencies: - dependency-name: github.com/tetratelabs/wazero dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								2decea6335
							
						
					
				
			
			
				commit
				
					
						d8c027f8af
					
				
			
		
					 14 changed files with 88 additions and 80 deletions
				
			
		
							
								
								
									
										20
									
								
								vendor/github.com/tetratelabs/wazero/internal/sysfs/osfile.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/github.com/tetratelabs/wazero/internal/sysfs/osfile.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -4,7 +4,6 @@ import ( | |||
| 	"io" | ||||
| 	"io/fs" | ||||
| 	"os" | ||||
| 	"runtime" | ||||
| 
 | ||||
| 	experimentalsys "github.com/tetratelabs/wazero/experimental/sys" | ||||
| 	"github.com/tetratelabs/wazero/internal/fsapi" | ||||
|  | @ -12,11 +11,17 @@ import ( | |||
| ) | ||||
| 
 | ||||
| func newOsFile(path string, flag experimentalsys.Oflag, perm fs.FileMode, f *os.File) fsapi.File { | ||||
| 	// Windows cannot read files written to a directory after it was opened. | ||||
| 	// This was noticed in #1087 in zig tests. Use a flag instead of a | ||||
| 	// different type. | ||||
| 	reopenDir := runtime.GOOS == "windows" | ||||
| 	return &osFile{path: path, flag: flag, perm: perm, reopenDir: reopenDir, file: f, fd: f.Fd()} | ||||
| 	// On POSIX, if a file is removed from or added to the directory after the | ||||
| 	// most recent call to opendir() or rewinddir(), whether a subsequent call | ||||
| 	// to readdir() returns an entry for that file is unspecified. | ||||
| 	// | ||||
| 	// And Windows cannot read files added to a directory after it was opened. | ||||
| 	// This was noticed in #1087 in zig tests. | ||||
| 	// | ||||
| 	// So there is no guarantee that files added after opendir() will be visible | ||||
| 	// in readdir(). Since we want those files to be visible, we need to | ||||
| 	// reopendir() to get the new state of the directory before readdir(). | ||||
| 	return &osFile{path: path, flag: flag, perm: perm, reopenDir: true, file: f, fd: f.Fd()} | ||||
| } | ||||
| 
 | ||||
| // osFile is a file opened with this package, and uses os.File or syscalls to | ||||
|  | @ -270,6 +275,9 @@ func (f *osFile) Pwrite(buf []byte, off int64) (n int, errno experimentalsys.Err | |||
| 
 | ||||
| // Truncate implements the same method as documented on sys.File | ||||
| func (f *osFile) Truncate(size int64) (errno experimentalsys.Errno) { | ||||
| 	if size < 0 { | ||||
| 		return experimentalsys.EINVAL | ||||
| 	} | ||||
| 	if errno = experimentalsys.UnwrapOSError(f.file.Truncate(size)); errno != 0 { | ||||
| 		// Defer validation overhead until we've already had an error. | ||||
| 		errno = fileError(f, f.closed, errno) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue