Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for bitrotVerify (0.06 sec)

  1. cmd/xl-storage_test.go

    	// Check if VerifyFile reports the incorrect file length (the correct length is `size+1`)
    	if err := storage.storage.bitrotVerify(context.Background(), pathJoin(path, volName, fileName), size, algo, hashBytes, 0); err == nil {
    		t.Fatal("expected to fail bitrot check")
    	}
    
    	// Check if bitrot fails
    	if err := storage.storage.bitrotVerify(context.Background(), pathJoin(path, volName, fileName), size+1, algo, hashBytes, 0); err == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  2. cmd/xl-storage.go

    	}
    
    	// Remove parent dir of the source file if empty
    	parentDir := pathutil.Dir(srcFilePath)
    	s.deleteFile(srcVolumeDir, parentDir, false, false)
    
    	return nil
    }
    
    func (s *xlStorage) bitrotVerify(ctx context.Context, partPath string, partSize int64, algo BitrotAlgorithm, sum []byte, shardSize int64) error {
    	// Open the file for reading.
    	file, err := OpenFile(partPath, readMode, 0o666)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 91.3K bytes
    - Viewed (0)
Back to top