Skip to content

Commit 8720314

Browse files
committed
fs::canonicalize has some important portability concerns.
1 parent 9d7eda9 commit 8720314

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/fs.rs

+7
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,14 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
17081708
/// and the `CreateFile` and `GetFinalPathNameByHandle` functions on Windows.
17091709
/// Note that, this [may change in the future][changes].
17101710
///
1711+
/// On Windows, this converts the path to use [extended length path][path]
1712+
/// syntax, which allows your program to use longer path names, but means you
1713+
/// can only join backslash-delimited paths to it, and it may be incompatible
1714+
/// with other applications (if passed to the application on the command-line,
1715+
/// or written to a file another application may read).
1716+
///
17111717
/// [changes]: ../io/index.html#platform-specific-behavior
1718+
/// [path]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
17121719
///
17131720
/// # Errors
17141721
///

0 commit comments

Comments
 (0)