]> git.lizzy.rs Git - rust.git/commitdiff
Return proper errors with update_err
authorGleb Kozyrev <gleb@gkoz.com>
Mon, 17 Nov 2014 17:17:39 +0000 (19:17 +0200)
committerGleb Kozyrev <gleb@gkoz.com>
Mon, 17 Nov 2014 17:18:26 +0000 (19:18 +0200)
src/libstd/io/fs.rs

index f4e795721cf54caa82ad3c16948e26cc884b9ccc..cd4141e045cb5dc8b5c0d4be0c415549099162ca 100644 (file)
@@ -382,7 +382,7 @@ fn update_err<T>(result: IoResult<T>, from: &Path, to: &Path) -> IoResult<T> {
     let mut reader = try!(File::open(from));
     let mut writer = try!(File::create(to));
 
-    try!(super::util::copy(&mut reader, &mut writer));
+    try!(update_err(super::util::copy(&mut reader, &mut writer), from, to));
 
     chmod(to, try!(update_err(from.stat(), from, to)).perm)
 }