Changeset 679 for trunk/src


Ignore:
Timestamp:
Mar 13, 2010, 10:16:00 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib: QTemporaryFile: FIxed: Files were opened in O_TEXT mode which caused unexpected LF <-> CRLF translation. In particular, this broke QNetworkDiskCache functionality (seen in e.g. demos/browser as missing images and CSS sheets when read from cache).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/io/qtemporaryfile.cpp

    r651 r679  
    174174            if (*trv == '/') {
    175175                *trv = '\0';
    176 #if defined (Q_OS_WIN) && !defined(Q_OS_WINCE)
     176#if (defined (Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined (Q_OS_OS2)
    177177                if (trv - path == 2 && path[1] == ':') {
    178178                    // Special case for Windows drives
     
    217217                QT_OPEN(targetPath.toLocal8Bit(), O_CREAT|O_EXCL|O_RDWR
    218218#  else // CE
    219             // this is Unix or older MSVC
     219            // this is Unix or older MSVC or OS/2
    220220            if ((*doopen =
    221221                QT_OPEN(path, QT_OPEN_CREAT|O_EXCL|QT_OPEN_RDWR
     
    226226#  if defined(Q_OS_WINCE)
    227227                           |_O_BINARY
    228 #  elif defined(Q_OS_WIN)
     228#  elif defined(Q_OS_WIN) || defined (Q_OS_OS2)
    229229                           |O_BINARY
    230230#  endif
Note: See TracChangeset for help on using the changeset viewer.