Skip to content

Commit

Permalink
Subtract REST start position for the SIZE command (#39).
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesdejager committed Oct 13, 2019
1 parent 63d14bb commit 1f91db5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ where
feat_text.push(" PROT");
}
if storage_features & storage::FEATURE_RESTART > 0 {
feat_text.push("REST STREAM");
feat_text.push(" REST STREAM");
}

// Show them in alphabetical order.
Expand Down Expand Up @@ -815,7 +815,7 @@ where
let storage = Arc::clone(&session.storage);

match storage.size(&session.user, &file).wait() {
Ok(size) => Ok(Reply::new(ReplyCode::FileStatus, &*size.to_string())),
Ok(size) => Ok(Reply::new(ReplyCode::FileStatus, &*(size - session.start_pos).to_string())),
Err(_) => Ok(Reply::new(ReplyCode::FileError, "Could not get size.")),
}
}
Expand Down

0 comments on commit 1f91db5

Please sign in to comment.