Skip to content

Commit

Permalink
Prepare for 0.6.3 release (Velocidex#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Jan 26, 2022
1 parent d54fb8c commit a85af46
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

const (
VERSION = "0.6.3-rc2"
VERSION = "0.6.3"
ENROLLMENT_WELL_KNOWN_FLOW = "E:Enrol"
MONITORING_WELL_KNOWN_FLOW = FLOW_PREFIX + "Monitoring"

Expand Down
3 changes: 1 addition & 2 deletions datastore/filebased.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ package datastore
import (
"fmt"
"io"
"io/fs"
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -123,7 +122,7 @@ func (self *FileBaseDataStore) GetSubject(

func (self *FileBaseDataStore) Debug(config_obj *config_proto.Config) {
filepath.Walk(config_obj.Datastore.Location,
func(path string, info fs.FileInfo, err error) error {
func(path string, info os.FileInfo, err error) error {
fmt.Printf("%v -> %v %v\n", path, info.Size(), info.Mode())
return nil
})
Expand Down
3 changes: 1 addition & 2 deletions datastore/filebased_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package datastore

import (
"fmt"
"io/fs"
"io/ioutil"
"os"
"path/filepath"
Expand All @@ -20,7 +19,7 @@ type FilebasedTestSuite struct {

func (self FilebasedTestSuite) DumpDirectory() {
filepath.Walk(self.dirname, func(path string,
info fs.FileInfo, err error) error {
info os.FileInfo, err error) error {
if !info.IsDir() {
fmt.Printf("%v: %v\n", path, info.Size())
}
Expand Down
4 changes: 2 additions & 2 deletions datastore/memcache_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ package datastore

import (
"context"
"io/fs"
"os"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -239,7 +239,7 @@ func (self *MemcacheFileDataStore) GetSubject(
defer Instrument("read", "MemcacheFileDataStore", urn)()

err := self.cache.GetSubject(config_obj, urn, message)
if errors.Is(err, fs.ErrNotExist) {
if errors.Is(err, os.ErrNotExist) {
// The file is not in the cache, read it from the file system
// instead.
serialized_content, err := readContentFromFile(
Expand Down
2 changes: 1 addition & 1 deletion file_store/memcache/memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func NewMemcacheFileStore(config_obj *config_proto.Config) *MemcacheFileStore {
writer._Flush()

// We are not done with it yet - return it to the cache.
if !writer.closed {
if !result.IsClosed() && !writer.closed {
result.data_cache.Set(writer.key, writer)
}
}
Expand Down
9 changes: 9 additions & 0 deletions gui/velociraptor/src/components/clients/client_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ class ClientSetterFromRoute extends Component {
return;
}

// We have no idea what this client is, just create an
// empty record so the GUI can show something. This could
// happen if the client is not in the index for some
// reason so SearchClients can not find it, but it really
// does exist.
this.props.setClient({
client_id: client_id,
});

api.get('/v1/SearchClients', {
query: client_id,
}, this.source.token).then(resp => {
Expand Down
3 changes: 3 additions & 0 deletions gui/velociraptor/src/components/clients/host-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ class VeloHostInfo extends Component {
}

fetchMetadata = () => {
if (_.isEmpty(this.props.client.client_id)) {
return;
}
this.setState({metadata_loading: true});

this.source.cancel();
Expand Down
3 changes: 1 addition & 2 deletions services/repository/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"io/fs"
"io/ioutil"
"os"
"path/filepath"
Expand All @@ -26,7 +25,7 @@ func InitializeGlobalRepositoryFromFilesystem(

logger := logging.GetLogger(config_obj, &logging.FrontendComponent)
err := filepath.Walk(config_obj.Frontend.ArtifactDefinitionsDirectory,
func(path string, finfo fs.FileInfo, err error) error {
func(path string, finfo os.FileInfo, err error) error {
if err != nil {
return fmt.Errorf(
"InitializeGlobalRepositoryFromFilesystem: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions vql/server/file_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package server
import (
"context"
"errors"
"io/fs"
"os"
"strings"

"github.com/Velocidex/ordereddict"
Expand Down Expand Up @@ -106,7 +106,7 @@ func (self *DeleteFileStore) Call(ctx context.Context,
return vfilter.Null{}
}

if err != nil && !errors.Is(err, fs.ErrNotExist) {
if err != nil && !errors.Is(err, os.ErrNotExist) {
scope.Log("file_store_delete: %v", err)
return vfilter.Null{}
}
Expand Down

0 comments on commit a85af46

Please sign in to comment.