Browse Source

Formatting + Quality

pull/409/head
Sarah Jamie Lewis 1 month ago
parent
commit
c5b61cdaf7
  1. 2
      app/applets.go
  2. 2
      model/attr/scope.go
  3. 1
      protocol/files/manifest_test.go
  4. 2
      storage/v1/file_enc.go
  5. 2
      storage/v1/profile_store.go

2
app/applets.go

@ -113,7 +113,7 @@ func (ap *appletPlugins) AddPlugin(peerid string, id plugins.PluginID, bus event
pluginsinf, _ := ap.plugins.Load(peerid)
peerPlugins := pluginsinf.([]plugins.Plugin)
newp,err := plugins.Get(id, bus, acn, peerid)
newp, err := plugins.Get(id, bus, acn, peerid)
if err == nil {
newp.Start()
peerPlugins = append(peerPlugins, newp)

2
model/attr/scope.go

@ -77,4 +77,4 @@ func (scope Scope) IsPublic() bool {
// IsConversation returns true if the scope is a conversation scope
func (scope Scope) IsConversation() bool {
return scope == ConversationScope
}
}

1
protocol/files/manifest_test.go

@ -117,7 +117,6 @@ func TestManifestLarge(t *testing.T) {
t.Fatalf("could not store chunk %v %v", i, err)
}
// Attempt to store the chunk in an invalid position...
_, err = cwtchPngOutManifest.StoreChunk(uint64(i+1), contents)
if err == nil {

2
storage/v1/file_enc.go

@ -63,7 +63,7 @@ func DecryptFile(ciphertext []byte, key [32]byte) ([]byte, error) {
func ReadEncryptedFile(directory, filename string, key [32]byte) ([]byte, error) {
encryptedbytes, err := ioutil.ReadFile(path.Join(directory, filename))
if err == nil {
return DecryptFile(encryptedbytes, key)
return DecryptFile(encryptedbytes, key)
}
return nil, err
}

2
storage/v1/profile_store.go

@ -10,8 +10,6 @@ import (
)
const profileFilename = "profile"
const version = "1"
const versionFile = "VERSION"
const saltFile = "SALT"
//ProfileStoreV1 storage for profiles and message streams that uses in memory key and fs stored salt instead of in memory password

Loading…
Cancel
Save