diff --git a/cmd/longtail/main.go b/cmd/longtail/main.go index 13bd55b6..0594ef51 100644 --- a/cmd/longtail/main.go +++ b/cmd/longtail/main.go @@ -573,7 +573,7 @@ func upSyncVersion( existingRemoteContentIndex.GetMaxBlockSize(), existingRemoteContentIndex.GetMaxChunksPerBlock()) if errno != 0 { - return errors.Wrapf(longtaillib.ErrnoToError(errno, longtaillib.ErrEIO), "upSyncVersion: longtaillib.CreateMissingContent(%s) failed with %s", sourceFolderPath) + return errors.Wrapf(longtaillib.ErrnoToError(errno, longtaillib.ErrEIO), "upSyncVersion: longtaillib.CreateMissingContent(%s) failed", sourceFolderPath) } defer versionMissingContentIndex.Dispose() @@ -590,7 +590,7 @@ func upSyncVersion( vindex, normalizePath(sourceFolderPath)) if errno != 0 { - return errors.Wrapf(longtaillib.ErrnoToError(errno, longtaillib.ErrEIO), "upSyncVersion: longtaillib.WriteContent(%s) failed with %s", sourceFolderPath) + return errors.Wrapf(longtaillib.ErrnoToError(errno, longtaillib.ErrEIO), "upSyncVersion: longtaillib.WriteContent(%s) failed", sourceFolderPath) } } diff --git a/longtailstorelib/remotestore.go b/longtailstorelib/remotestore.go index a3536a73..4c04d77c 100644 --- a/longtailstorelib/remotestore.go +++ b/longtailstorelib/remotestore.go @@ -363,7 +363,7 @@ func remoteWorker( select { case putMsg := <-putBlockMessages: received += 1 - if accessType != ReadOnly { + if accessType == ReadOnly { putMsg.asyncCompleteAPI.OnComplete(longtaillib.EACCES) continue } @@ -380,7 +380,7 @@ func remoteWorker( case _ = <-flushMessages: flushReplyMessages <- 0 case putMsg := <-putBlockMessages: - if accessType != ReadOnly { + if accessType == ReadOnly { putMsg.asyncCompleteAPI.OnComplete(longtaillib.EACCES) continue } @@ -398,7 +398,7 @@ func remoteWorker( case _ = <-flushMessages: flushReplyMessages <- 0 case putMsg := <-putBlockMessages: - if accessType != ReadOnly { + if accessType == ReadOnly { putMsg.asyncCompleteAPI.OnComplete(longtaillib.EACCES) continue }