[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kioslave/http
From: Thiago Macieira <thiagom () mail ! com>
Date: 2003-05-26 14:45:58
[Download RAW message or body]
CVS commit by thiago:
Workaround for when the WebDAV server sends us a MIME type for a directory.
At least Subversion 0.20 is known to send text/plain for them.
Viewing with Konqueror has a double effect: directories in trees get the +
sign to allow you to expand the tree, but clicking on them launches the
text viewer.
M +10 -4 http.cc 1.576
--- kdelibs/kioslave/http/http.cc #1.575:1.576
@@ -702,4 +702,5 @@ int HTTPProtocol::codeFromResponse( cons
void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& entry )
{
+ QString mimeType;
UDSAtom atom;
bool foundExecutable = false;
@@ -796,9 +797,7 @@ void HTTPProtocol::davParsePropstats( co
isDirectory = true;
}
- else if ( property.text() != "" )
+ else
{
- atom.m_uds = KIO::UDS_MIME_TYPE;
- atom.m_str = property.text();
- entry.append( atom );
+ mimeType = property.text();
}
}
@@ -887,4 +886,11 @@ void HTTPProtocol::davParsePropstats( co
atom.m_long = 0600;
entry.append(atom);
+ }
+
+ if ( !isDirectory && !mimeType.isEmpty() )
+ {
+ atom.m_uds = KIO::UDS_MIME_TYPE;
+ atom.m_str = mimeType;
+ entry.append( atom );
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic