about summary refs log tree commit diff
path: root/src/libstd/sys/unix
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2014-12-25 21:34:42 +0100
committerFlorian Hahn <flo@fhahn.com>2014-12-25 22:22:44 +0100
commiteb4b20288e6e8e704f5248c56601149dbf856599 (patch)
tree9c73141be14bc34a51d9cb4c17c5189fbf14690b /src/libstd/sys/unix
parentf673e9841f58a2196efd3b757804efa2575f8b79 (diff)
downloadrust-eb4b20288e6e8e704f5248c56601149dbf856599.tar.gz
rust-eb4b20288e6e8e704f5248c56601149dbf856599.zip
Map EEXIST to PathAlreadyExists error, closes #20226
Diffstat (limited to 'src/libstd/sys/unix')
-rw-r--r--src/libstd/sys/unix/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs
index f3babca3287..4b7ac8ff4d3 100644
--- a/src/libstd/sys/unix/mod.rs
+++ b/src/libstd/sys/unix/mod.rs
@@ -109,6 +109,8 @@ pub fn decode_error(errno: i32) -> IoError {
              "file descriptor is not a TTY"),
         libc::ETIMEDOUT => (io::TimedOut, "operation timed out"),
         libc::ECANCELED => (io::TimedOut, "operation aborted"),
+        libc::consts::os::posix88::EEXIST =>
+            (io::PathAlreadyExists, "path already exists"),
 
         // These two constants can have the same value on some systems,
         // but different values on others, so we can't use a match