From 8720314c025cd222fd04d07119e2cf180f53770a Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Thu, 10 May 2018 18:06:47 +1000 Subject: [PATCH] fs::canonicalize has some important portability concerns. --- src/libstd/fs.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index f877c77ad7ff..732da79a4d4d 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -1708,7 +1708,14 @@ pub fn read_link>(path: P) -> io::Result { /// and the `CreateFile` and `GetFinalPathNameByHandle` functions on Windows. /// Note that, this [may change in the future][changes]. /// +/// On Windows, this converts the path to use [extended length path][path] +/// syntax, which allows your program to use longer path names, but means you +/// can only join backslash-delimited paths to it, and it may be incompatible +/// with other applications (if passed to the application on the command-line, +/// or written to a file another application may read). +/// /// [changes]: ../io/index.html#platform-specific-behavior +/// [path]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath /// /// # Errors ///