New submission from Larry Hastings <la...@hastings.org>: The prototype for os.symlink on Windows adds a "target_is_directory" flag, which indicates whether or not the destination is a directory.
Surely we could detect that and pass in the correct value ourselves? A quick GetFileAttributes() call would do. I doubt this would make the function much slower, as it's about to write to that area of the disk anyway. And if os.symlink is a performance-critical function on Windows I'll eat my hat. Since os.symlink support for Windows shipped in 3.2, we can't get rid of the argument at the same time. But we could just ignore it, and since it's marked as optional people could start removing it, and maybe we could deprecate it. ---------- components: Windows messages: 161587 nosy: larry priority: low severity: normal stage: needs patch status: open title: Make os.symlink on Win32 detect if target is directory type: enhancement versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14917> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com