Created
May 26, 2012 21:19
-
-
Save killerswan/2795348 to your computer and use it in GitHub Desktop.
os::copy_file makes a funny smell?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn copy_warn(src: str, dest: str) { | |
| if !os::copy_file(src, dest) { | |
| io::println(#fmt["Copying %s to %s failed", src, dest]); | |
| } | |
| } | |
| fn main() { | |
| // EDIT: not so bad, I just wasn't paying attention | |
| copy_warn("./dir/a", "./dir2" ); | |
| copy_warn("./dir/a", "./dir2/a"); // THIS ONE IS OK | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment