diff --git a/Makefile b/Makefile index b4da855..9802503 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ .PHONY: vendor SHELL=/bin/bash # Use bash syntax -GOPATH=/go USER_ID := $(shell id -u) USER_NAME := $(shell whoami) GROUP_ID := $(shell id -g) @@ -42,4 +41,4 @@ unit-tests: go list ./common/... | xargs -I {} go test -v {} e2e-tests: install - cd test/scripts; ./e2e.sh \ No newline at end of file + cd test/scripts; ./e2e.sh diff --git a/common/dbx/iso.go b/common/dbx/iso.go index 549e19a..1772be0 100644 --- a/common/dbx/iso.go +++ b/common/dbx/iso.go @@ -16,7 +16,7 @@ var listFilesNotInIsoOrCloudStmt = "select d.scan_root_dir_id, d.path, f.name, f " order by f.dir_id, f.id" const ( - listFilesNotInIsoAndCloudStmt = "select d.scan_root_dir_id, d.path, f.name, f.id, f.size, f.hash, f.mod_time from files as f" + + listFilesNotInIsoAndCloudStmt = "select d.scan_root_dir_id, d.path, f.name, f.id, f.size, f.hash_local, f.mod_time from files as f" + " inner join dirs as d on f.dir_id=d.id where f.iso_id=0 order by f.dir_id, f.id" getTotalFileSizeNotInIsoStmt = "select sum(size) from files where iso_id=0" getTotalFilesInIsoStmt = "select sum(size), count(size) from files where iso_id=?" diff --git a/common/gcloud/upload.go b/common/gcloud/upload.go index 2f649f8..5d08220 100644 --- a/common/gcloud/upload.go +++ b/common/gcloud/upload.go @@ -144,13 +144,11 @@ func (c *DriveClient) UpdateFileMetadata(fileID string, metadata map[string]stri file.AppProperties = metadata // Call the update method with modified metadata - updatedFile, err := c.srv.Files.Update(fileID, file).Fields("id, name, appProperties").Do() + _, err = c.srv.Files.Update(fileID, file).Fields("id, name, appProperties").Do() if err != nil { return fmt.Errorf("failed to update file metadata: %v", err) } - fmt.Printf("--- %+v\n", updatedFile) - return nil }