View | Details | Raw Unified | Return to bug 179019
Collapse All | Expand All

(-)kio/kio/kfileshare.cpp.sav (-1 / +9 lines)
Lines 20-25 Link Here
20
#include "kfileshare.h"
20
#include "kfileshare.h"
21
#include <qdir.h>
21
#include <qdir.h>
22
#include <qfile.h>
22
#include <qfile.h>
23
#include <qregexp.h>
23
#include <kprocess.h>
24
#include <kprocess.h>
24
#include <kprocio.h>
25
#include <kprocio.h>
25
#include <klocale.h>
26
#include <klocale.h>
Lines 186-199 void KFileShare::readShareList() Link Here
186
187
187
    // Reading code shamelessly stolen from khostname.cpp ;)
188
    // Reading code shamelessly stolen from khostname.cpp ;)
188
    QString line;
189
    QString line;
190
    QString options;
191
    QString path;
189
    int length;
192
    int length;
193
    QRegExp rx_line("([^\\s]+)\\s+(.*)");
190
    do {
194
    do {
191
        length = proc.readln(line, true);
195
        length = proc.readln(line, true);
192
	if ( length > 0 )
196
	if ( length > 0 )
193
	{
197
	{
194
            if ( line[length-1] != '/' )
198
            if ( line[length-1] != '/' )
195
                line += '/';
199
                line += '/';
196
            s_shareList->append(line);
200
            if( rx_line.search( line ) != -1 ) {
201
                options = rx_line.cap(1);
202
                path    = rx_line.cap(2);
203
                s_shareList->append(path);
204
            }
197
            kdDebug(7000) << "Shared dir:" << line << endl;
205
            kdDebug(7000) << "Shared dir:" << line << endl;
198
        }
206
        }
199
    } while (length > -1);
207
    } while (length > -1);

Return to bug 179019