Skip to content

Commit

Permalink
Fix a bug with getting the current directory name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Divoolej committed Feb 8, 2019
1 parent 88a1149 commit 95446ae
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "picobu"
version = "1.0.2"
version = "1.0.3"
authors = ["Wojciech Olejnik <divoolej@gmail.com>"]
readme = "README.md"
categories = ["command-line-utilities", "development-tools::build-utils", "filesystem", "game-engines"]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Picobu uses a sensible-defaults, zero-configuration approach. You can use it by
### Installation

#### Cross-platform
<<<<<<< Updated upstream
The easiest way to install Picobu on any OS is by using [cargo](https://www.rust-lang.org/tools/install):
```fish
❯ cargo install picobu
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ fn check_output_file(output: &Option<PathBuf>) -> PathBuf {
}
}
if outputs.len() == 0 {
let dir = Path::new(".").to_str().unwrap();
let dir = format!("{}.p8", dir);
let dir = Path::new("./").canonicalize().unwrap();
let dir = format!("{}.p8", dir.file_name().unwrap().to_str().unwrap());
println!("No *.p8 files found, generating a new one using the current directory's name ({})..", dir);
fs::File::create(&dir).unwrap();
return Path::new(&dir).to_path_buf();
Expand Down

0 comments on commit 95446ae

Please sign in to comment.