diff --git a/Cargo.toml b/Cargo.toml index 4b71de0..9147040 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,8 +16,8 @@ authors = ["Christoph J. Scherr "] license = "MIT" description = "Personal multitool" readme = "README.md" -homepage = "https://git.cscherr.de/PlexSheep/libpt" -repository = "https://git.cscherr.de/PlexSheep/libpt" +homepage = "https://git.cscherr.de/PlexSheep/pt" +repository = "https://git.cscherr.de/PlexSheep/pt" keywords = ["cli", "library"] categories = [ "command-line-utilities", diff --git a/members/libpt-bintols/src/hedu/mod.rs b/members/libpt-bintols/src/hedu/mod.rs index 1428a96..c42abf1 100644 --- a/members/libpt-bintols/src/hedu/mod.rs +++ b/members/libpt-bintols/src/hedu/mod.rs @@ -69,6 +69,7 @@ pub fn dump(data: &mut dyn DataSource, mut config: HeduConfig) -> Result<()> { if config.skip > 0 { data.skip(config.skip)?; config.data_idx += config.skip; + adjust_data_idx(&mut config); debug!("Skipped {}", humanbytes(config.skip)); } @@ -157,6 +158,11 @@ fn mask_chars(c: char) -> char { } } +#[inline] +fn adjust_data_idx(config: &mut HeduConfig) { + config.data_idx += BYTES_PER_LINE - config.data_idx % BYTES_PER_LINE; +} + fn rd_data(data: &mut dyn DataSource, config: &mut HeduConfig) -> Result<()> { match data.read(&mut config.buf[config.alt_buf]) { Ok(mut len) => { @@ -177,6 +183,7 @@ fn rd_data(data: &mut dyn DataSource, config: &mut HeduConfig) -> Result<()> { config.len = len; config.rd_counter += config.len; config.data_idx += config.len; + adjust_data_idx(config); return Ok(()); } Err(err) => { diff --git a/scripts/publish.sh b/scripts/publish.sh index 84036cb..db3c89a 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -6,5 +6,5 @@ NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1') bash scripts/set_all_versions.sh $NEW_VERSION git add -A git commit -m "Release v$NEW_VERSION" -cargo ws publish --registry cscherr --amend --publish-as-is || cargo publish --registry cscherr -p libpt +cargo ws publish --registry cscherr --no-git-push --publish-as-is || cargo publish --registry cscherr -p libpt git push