Skip to content

Commit

Permalink
Fix clippy. Fix Travis link. Fix Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed May 24, 2018
1 parent 098579c commit 53128a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Expand Up @@ -45,8 +45,6 @@ script:
mkdir man; pushd man;
cp ../bloguen.md bloguen.md;
ronn --organization="bloguen developers" bloguen.md;
mv "bloguen.1.html" "bloguen.1.html";
mv "bloguen.1" "bloguen.1";
popd;
fi

Expand Down Expand Up @@ -79,7 +77,7 @@ after_success:
echo;
git log $TRAVIS_COMMIT_RANGE --pretty=oneline;
) >> $TRAVIS_BUILD_DIR/../MAN_UPDATE_MSG;
mkdir -p ~/.ssh && cp gh_rsa_awk ~/.ssh/id_rsa && chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa;
mkdir -p ~/.ssh && cp gh_rsa ~/.ssh/id_rsa && chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa;
git clone -b man git@github.com:nabijaczleweli/bloguen.git $TRAVIS_BUILD_DIR-man;
cp -f man/* "$TRAVIS_BUILD_DIR-man";
pushd "$TRAVIS_BUILD_DIR-man";
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# bloguen [![TravisCI Build Status](https://travis-ci.org/nabijaczleweli/bloguen.svg?branch=master)](https://travis-ci.org/nabijaczleweli/bloguen) [![AppVeyorCI build status](https://ci.appveyor.com/api/projects/status/vq47997o25jkckfw/branch/master?svg=true)](https://ci.appveyor.com/project/nabijaczleweli/bloguen-rs/branch/master) [![Licence](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) [![Crates.io version](https://meritbadge.herokuapp.com/bloguen)](https://crates.io/crates/bloguen)
# bloguen [![TravisCI Build Status](https://travis-ci.org/nabijaczleweli/bloguen.svg?branch=master)](https://travis-ci.org/nabijaczleweli/bloguen) [![AppVeyorCI build status](https://ci.appveyor.com/api/projects/status/vq47997o25jkckfw/branch/master?svg=true)](https://ci.appveyor.com/project/nabijaczleweli/bloguen/branch/master) [![Licence](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) [![Crates.io version](https://meritbadge.herokuapp.com/bloguen)](https://crates.io/crates/bloguen)
Generate a blogue from Markdown (again).

## [Manpage](https://cdn.rawgit.com/nabijaczleweli/bloguen/man/bloguen.1.html)
Expand Down
18 changes: 8 additions & 10 deletions src/options.rs
Expand Up @@ -55,17 +55,15 @@ impl Options {
}
if p.exists() {
Err(format!("Output directory \"{}\" already exists", p.display()))
} else {
if p.parent().is_some() {
p.pop();
fs::canonicalize(&p).map_err(|_| format!("Output directory's parent directory \"{}\" nonexistant", p.display())).and_then(|f| if !f.is_file() {
Ok(())
} else {
Err(format!("Output directory's parent directory \"{}\" actually a file", p.display()))
})
} else {
} else if p.parent().is_some() {
p.pop();
fs::canonicalize(&p).map_err(|_| format!("Output directory's parent directory \"{}\" nonexistant", p.display())).and_then(|f| if !f.is_file() {
Ok(())
}
} else {
Err(format!("Output directory's parent directory \"{}\" actually a file", p.display()))
})
} else {
Ok(())
}
}
}

0 comments on commit 53128a9

Please sign in to comment.