Changeset 1112
- Timestamp:
- Mar 1, 2013, 12:42:39 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/io/qfsfileengine_os2.cpp
r796 r1112 66 66 #include <unistd.h> 67 67 68 69 70 71 68 72 #include <pwd.h> 69 73 #include <grp.h> … … 798 802 if (!::isRelativePath(d->filePath)) { 799 803 if (::isNotReallyAbsolutePath(d->filePath)) { 804 800 805 char buf[PATH_MAX+1]; 801 strcpy(buf, QFile::encodeName(d->filePath).constData()); 806 #ifdef __INNOTEK_LIBC__ 807 // In kLIBC (0.6.5-), _abspath() doesn't perform path rewriting to expand 808 // e.g. /@unixroot/dir to X:/my_unixroot/dir which confuses many apps by 809 // translating such paths to invalid ones like X:/@unixroot/dir. Fix this 810 // by calling path rewrite explicitly. @todo kLIBC should actually do that. 811 if (__libc_PathRewrite(filePath.constData(), buf, sizeof(buf)) <= 0) 812 #endif 813 strcpy(buf, filePath.constData()); 802 814 _abspath(buf, buf, sizeof(buf)); 803 815 ret = QFile::decodeName(buf); … … 856 868 if (!::isRelativePath(target)) { 857 869 if (::isNotReallyAbsolutePath(target)) { 870 858 871 char buf[PATH_MAX+1]; 859 strcpy(buf, QFile::encodeName(target).constData()); 872 #ifdef __INNOTEK_LIBC__ 873 // In kLIBC (0.6.5-), _abspath() doesn't perform path rewriting to expand 874 // e.g. /@unixroot/dir to X:/my_unixroot/dir which confuses many apps by 875 // translating such paths to invalid ones like X:/@unixroot/dir. Fix this 876 // by calling path rewrite explicitly. @todo kLIBC should actually do that. 877 if (__libc_PathRewrite(filePath.constData(), buf, sizeof(buf)) <= 0) 878 #endif 879 strcpy(buf, filePath.constData()); 860 880 _abspath(buf, buf, sizeof(buf)); 861 881 ret = QFile::decodeName(buf);
Note:
See TracChangeset
for help on using the changeset viewer.