mirror of
				https://github.com/restic/restic.git
				synced 2025-11-04 03:56:52 +00:00 
			
		
		
		
	restorer: Skip preallocate test if not supported by the filesystem
This commit is contained in:
		@@ -4,6 +4,7 @@ import (
 | 
			
		||||
	"os"
 | 
			
		||||
	"path"
 | 
			
		||||
	"strconv"
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	"github.com/restic/restic/internal/fs"
 | 
			
		||||
@@ -24,6 +25,9 @@ func TestPreallocate(t *testing.T) {
 | 
			
		||||
			}()
 | 
			
		||||
 | 
			
		||||
			err = preallocateFile(wr, i)
 | 
			
		||||
			if err == syscall.ENOTSUP {
 | 
			
		||||
				t.SkipNow()
 | 
			
		||||
			}
 | 
			
		||||
			test.OK(t, err)
 | 
			
		||||
 | 
			
		||||
			fi, err := wr.Stat()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user