~ubuntu-branches/ubuntu/trusty/krusader/trusty

« back to all changes in this revision

Viewing changes to krusader/krservices.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Roderick B. Greening
  • Date: 2009-01-30 12:46:14 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090130124614-xoq7xpzcr0jck19y
Tags: 2.0~svn6194-0ubuntu1
* New svn snapshot to commit 6194
  - Additional fixes (see: http://krusader.svn.sourceforge.net/viewvc/krusader/trunk/krusader_kde4/?view=log)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
// Krusader includes
26
26
#include "krservices.h"
27
27
#include "krusader.h"
 
28
#include "defaults.h"
28
29
 
29
30
QMap<QString,QString>* KrServices::slaveMap=0;
30
31
 
205
206
  return name;
206
207
}
207
208
 
 
209
QString KrServices::getPath( const KUrl & url, KUrl::AdjustPathOption trailing )
 
210
{
 
211
        QString path = url.path( trailing );
 
212
        REPLACE_DIR_SEP2( path );
 
213
        
 
214
        #ifdef Q_WS_WIN
 
215
        if( path.startsWith( DIR_SEPARATOR ) )
 
216
        {
 
217
                int p = 1;
 
218
                while( p < path.length() && path[ p ] == DIR_SEPARATOR_CHAR )
 
219
                        p++;
 
220
                /* /C:/Folder */
 
221
                if( p + 2 <= path.length() && path[ p ].isLetter() && path[ p + 1 ] == ':' )
 
222
                {
 
223
                        path = path.mid( p );
 
224
                }
 
225
        }
 
226
        #endif
 
227
        return path;
 
228
}