Fix stat.rs to not pollute the build directory. Closes #6959.

This commit is contained in:
Michael Sullivan 2013-06-05 16:00:12 -07:00
parent c5fea4a673
commit 1ebb62f591
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,7 @@ use std::uint;
pub fn main() {
let dir = tempfile::mkdtemp(&Path("."), "").unwrap();
let path = dir.with_filename("file");
let path = dir.push("file");
{
match io::file_writer(&path, [io::Create, io::Truncate]) {
@ -36,5 +36,6 @@ pub fn main() {
assert!(path.exists());
assert_eq!(path.get_size(), Some(1000));
os::remove_file(&path);
os::remove_dir(&dir);
}