gofmt some files

This commit is contained in:
2023-10-04 01:23:03 -05:00
committed by John K. Luebs
parent 70ea4d3acf
commit 73ca9794ab
6 changed files with 53 additions and 54 deletions

View File

@@ -187,7 +187,7 @@ func (manager *BackupManager) Backup(top string, quickMode bool, threads int, ta
// If the listing operation is fast and this is an initial backup, list all chunks and // If the listing operation is fast and this is an initial backup, list all chunks and
// put them in the cache. // put them in the cache.
if (manager.storage.IsFastListing() && remoteSnapshot.Revision == 0) { if manager.storage.IsFastListing() && remoteSnapshot.Revision == 0 {
LOG_INFO("BACKUP_LIST", "Listing all chunks") LOG_INFO("BACKUP_LIST", "Listing all chunks")
allChunks, _ := manager.SnapshotManager.ListAllFiles(manager.storage, "chunks/") allChunks, _ := manager.SnapshotManager.ListAllFiles(manager.storage, "chunks/")
@@ -1298,6 +1298,7 @@ func (manager *BackupManager) UploadSnapshot(chunkOperator *ChunkOperator, top s
// file under the .duplicacy directory and then replaces the existing one. Otherwise, the existing file will be // file under the .duplicacy directory and then replaces the existing one. Otherwise, the existing file will be
// overwritten directly. // overwritten directly.
// Return: true, nil: Restored file; // Return: true, nil: Restored file;
//
// false, nil: Skipped file; // false, nil: Skipped file;
// false, error: Failure to restore file (only if allowFailures == true) // false, error: Failure to restore file (only if allowFailures == true)
func (manager *BackupManager) RestoreFile(chunkDownloader *ChunkDownloader, chunkMaker *ChunkMaker, entry *Entry, top string, inPlace bool, overwrite bool, func (manager *BackupManager) RestoreFile(chunkDownloader *ChunkDownloader, chunkMaker *ChunkMaker, entry *Entry, top string, inPlace bool, overwrite bool,

View File

@@ -609,7 +609,6 @@ func (entry *Entry) RestoreMetadata(fullPath string, fileInfo *os.FileInfo, setO
entry.SetAttributesToFile(fullPath) entry.SetAttributesToFile(fullPath)
} }
// Only set the time if the file is not a symlink // Only set the time if the file is not a symlink
if !entry.IsLink() && (*fileInfo).ModTime().Unix() != entry.Time { if !entry.IsLink() && (*fileInfo).ModTime().Unix() != entry.Time {
modifiedTime := time.Unix(entry.Time, 0) modifiedTime := time.Unix(entry.Time, 0)

View File

@@ -8,10 +8,10 @@
package duplicacy package duplicacy
import ( import (
"bytes"
"encoding/binary" "encoding/binary"
"os" "os"
"path/filepath" "path/filepath"
"bytes"
"syscall" "syscall"
"github.com/pkg/xattr" "github.com/pkg/xattr"
@@ -92,4 +92,3 @@ func (entry *Entry) RestoreEarlyDirFlags(path string) error {
func (entry *Entry) RestoreEarlyFileFlags(f *os.File) error { func (entry *Entry) RestoreEarlyFileFlags(f *os.File) error {
return nil return nil
} }

View File

@@ -5,10 +5,10 @@
package duplicacy package duplicacy
import ( import (
"os"
"syscall"
"strings"
"encoding/binary" "encoding/binary"
"os"
"strings"
"syscall"
) )
func excludedByAttribute(attributes map[string][]byte) bool { func excludedByAttribute(attributes map[string][]byte) bool {

View File

@@ -8,9 +8,9 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"os" "os"
"path/filepath"
"syscall" "syscall"
"unsafe" "unsafe"
"path/filepath"
"github.com/pkg/xattr" "github.com/pkg/xattr"
) )