Skip to content

Commit

Permalink
Quickfix - inverted readonly check
Browse files Browse the repository at this point in the history
Log fix
  • Loading branch information
DanEngelbrecht committed Nov 12, 2020
1 parent d3c3f68 commit f57f293
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/longtail/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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)
}
}

Expand Down
6 changes: 3 additions & 3 deletions longtailstorelib/remotestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func remoteWorker(
select {
case putMsg := <-putBlockMessages:
received += 1
if accessType != ReadOnly {
if accessType == ReadOnly {
putMsg.asyncCompleteAPI.OnComplete(longtaillib.EACCES)
continue
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit f57f293

Please sign in to comment.