Skip to content

Commit

Permalink
Merge pull request #22 from lomorage/dev-fix
Browse files Browse the repository at this point in the history
fix deprecated db column for hash local
  • Loading branch information
dwebfan authored Jun 8, 2024
2 parents 2927840 + c123f98 commit 4a998f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -42,4 +41,4 @@ unit-tests:
go list ./common/... | xargs -I {} go test -v {}

e2e-tests: install
cd test/scripts; ./e2e.sh
cd test/scripts; ./e2e.sh
2 changes: 1 addition & 1 deletion common/dbx/iso.go
Original file line number Diff line number Diff line change
Expand Up @@ -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=?"
Expand Down
4 changes: 1 addition & 3 deletions common/gcloud/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4a998f2

Please sign in to comment.