[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 44478] rfc1738 3.2 Intranet URL's
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-04-15 10:49:12
Message-ID: 20040415104912.31591.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=44478      
bastian kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From bastian kde org  2004-04-15 12:49 -------
CVS commit by waba: 

Redirect file://<host>/path URLs to smb://<host>/path
The protocol to redirect to is configurable in the kio_filerc config
file with for example:
	DefaultRemoteProtocol=fish
Based on a patch by Thiago Macieira (BR44478)
CCMAIL: 44478-done bugs kde org


  M +28 -2     file.cc   1.148


--- kdelibs/kioslave/file/file.cc  #1.147:1.148
 @ -169,4 +169,12  @ void FileProtocol::mkdir( const KURL& ur
 void FileProtocol::get( const KURL& url )
 {
+    if (!url.isLocalFile()) {
+        KURL redir(url);
+        redir.setProtocol(config()->readEntry("DefaultRemoteProtocol", "smb"));
+        redirection(redir);
+        finished();
+        return;
+    }
+
     QCString _path( QFile::encodeName(url.path()));
     KDE_struct_stat buff;
 @ -914,4 +922,13  @ bool FileProtocol::createUDSEntry( const
 void FileProtocol::stat( const KURL & url )
 {
+    if (!url.isLocalFile()) {
+        KURL redir(url);
+        redir.setProtocol(config()->readEntry("DefaultRemoteProtocol", "smb"));
+        redirection(redir);
+        kdDebug(7101) << "redirecting to " << redir.url() << endl;
+        finished();
+        return;
+    }
+
     /* directories may not have a slash at the end if
      * we want to stat() them; it requires that we
 @ -974,6 +991,15  @ void FileProtocol::stat( const KURL & ur
 void FileProtocol::listDir( const KURL& url)
 {
-    QCString _path( QFile::encodeName(url.path()));
     kdDebug(7101) << "========= LIST " << url.url() << " =========" << endl;
+    if (!url.isLocalFile()) {
+        KURL redir(url);
+        redir.setProtocol(config()->readEntry("DefaultRemoteProtocol", "smb"));
+        redirection(redir);
+        kdDebug(7101) << "redirecting to " << redir.url() << endl;
+        finished();
+        return;
+    }
+
+    QCString _path( QFile::encodeName(url.path()));
 
     KDE_struct_stat buff;
_______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic