]> git.lizzy.rs Git - rust.git/commitdiff
fs::canonicalize has some important portability concerns.
authorTim Allen <screwtape@froup.com>
Thu, 10 May 2018 08:06:47 +0000 (18:06 +1000)
committerTim Allen <screwtape@froup.com>
Thu, 10 May 2018 08:06:47 +0000 (18:06 +1000)
src/libstd/fs.rs

index f877c77ad7ff06b05ad5ea6f9a073bd97ae6fed2..732da79a4d4da34cc1a0abda600fb40a3a4e273a 100644 (file)
@@ -1708,7 +1708,14 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
 /// 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
 ///