~ubuntu-branches/ubuntu/jaunty/kde4libs/jaunty-updates

« back to all changes in this revision

Viewing changes to kioslave/file/file.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-12-11 18:26:08 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20081211182608-tsu6p8ncbw1gnqxt
Tags: 4:4.1.85-0ubuntu1
* New upstream release
* Patches:
  + Removed 15_kfreebsd_support.diff from patches/series (doesn't apply and
    has no use for Ubuntu)
  + Redid 20_use_dejavu_as_default_font.diff
  + Completely removed kubuntu_09_fix_application_menu.diff (applied upstream)
  + Refreshed kubuntu_54_use_xdg_menu_prefix.diff
  + Dropped plasma/widgets/toolbutton.cpp from kubuntu_qt_ftbfs.diff (applied
    upstream)
  + Global quilt refresh

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <config.h>
28
28
#include <config-acl.h>
29
29
 
30
 
#include <QtCore/QBool> //for Q_OS_XXX
31
30
#include <sys/types.h>
32
31
#include <sys/wait.h>
33
32
#include <sys/stat.h>
216
215
        finished();
217
216
}
218
217
 
219
 
void FileProtocol::chown( const KUrl& url, const QString& owner, const QString& group )
220
 
{
221
 
    QByteArray _path( QFile::encodeName(url.toLocalFile()) );
222
 
#ifdef Q_WS_WIN
223
 
    error( KIO::ERR_CANNOT_CHOWN, _path );
224
 
#else
225
 
 
226
 
    uid_t uid;
227
 
    gid_t gid;
228
 
 
229
 
    // get uid from given owner
230
 
    {
231
 
        struct passwd *p = ::getpwnam(owner.toAscii());
232
 
 
233
 
        if ( ! p ) {
234
 
            error( KIO::ERR_SLAVE_DEFINED,
235
 
                   i18n( "Could not get user id for given user name %1", owner ) );
236
 
            return;
237
 
        }
238
 
 
239
 
        uid = p->pw_uid;
240
 
    }
241
 
 
242
 
    // get gid from given group
243
 
    {
244
 
        struct group *p = ::getgrnam(group.toAscii());
245
 
 
246
 
        if ( ! p ) {
247
 
            error( KIO::ERR_SLAVE_DEFINED,
248
 
                   i18n( "Could not get group id for given group name %1", group ) );
249
 
            return;
250
 
        }
251
 
 
252
 
        gid = p->gr_gid;
253
 
    }
254
 
 
255
 
    if ( ::chown(_path, uid, gid) == -1 ) {
256
 
        switch ( errno ) {
257
 
            case EPERM:
258
 
            case EACCES:
259
 
                error( KIO::ERR_ACCESS_DENIED, _path );
260
 
                break;
261
 
            case ENOSPC:
262
 
                error( KIO::ERR_DISK_FULL, _path );
263
 
                break;
264
 
            default:
265
 
                error( KIO::ERR_CANNOT_CHOWN, _path );
266
 
        }
267
 
    } else
268
 
        finished();
269
 
#endif
270
 
}
271
 
 
272
218
void FileProtocol::setModificationTime( const KUrl& url, const QDateTime& mtime )
273
219
{
274
220
    const QByteArray path = QFile::encodeName(url.toLocalFile());
427
373
    finished();
428
374
}
429
375
 
430
 
static int
431
 
write_all(int fd, const char *buf, size_t len)
 
376
int write_all(int fd, const char *buf, size_t len)
432
377
{
433
378
   while (len > 0)
434
379
   {
580
525
    finished();
581
526
}
582
527
 
583
 
static bool
584
 
same_inode(const KDE_struct_stat &src, const KDE_struct_stat &dest)
585
 
{
586
 
   if (src.st_ino == dest.st_ino &&
587
 
       src.st_dev == dest.st_dev)
588
 
     return true;
589
 
 
590
 
   return false;
591
 
}
592
 
 
593
528
void FileProtocol::put( const KUrl& url, int _mode, KIO::JobFlags _flags )
594
529
{
595
530
    QString dest_orig = url.toLocalFile();
812
747
    finished();
813
748
}
814
749
 
815
 
#ifndef Q_OS_WIN
816
 
 
817
 
void FileProtocol::copy( const KUrl &src, const KUrl &dest,
818
 
                         int _mode, JobFlags _flags )
819
 
{
820
 
    kDebug(7101) << "copy(): " << src << " -> " << dest << ", mode=" << _mode;
821
 
 
822
 
    QByteArray _src( QFile::encodeName(src.toLocalFile()));
823
 
    QByteArray _dest( QFile::encodeName(dest.toLocalFile()));
824
 
    KDE_struct_stat buff_src;
825
 
#ifdef HAVE_POSIX_ACL
826
 
    acl_t acl;
827
 
#endif
828
 
 
829
 
    if ( KDE_stat( _src.data(), &buff_src ) == -1 ) {
830
 
        if ( errno == EACCES )
831
 
           error( KIO::ERR_ACCESS_DENIED, _src );
832
 
        else
833
 
           error( KIO::ERR_DOES_NOT_EXIST, _src );
834
 
        return;
835
 
    }
836
 
 
837
 
    if ( S_ISDIR( buff_src.st_mode ) ) {
838
 
        error( KIO::ERR_IS_DIRECTORY, src.path() );
839
 
        return;
840
 
    }
841
 
    if ( S_ISFIFO( buff_src.st_mode ) || S_ISSOCK ( buff_src.st_mode ) ) {
842
 
        error( KIO::ERR_CANNOT_OPEN_FOR_READING, src.path() );
843
 
        return;
844
 
    }
845
 
 
846
 
    KDE_struct_stat buff_dest;
847
 
    bool dest_exists = ( KDE_lstat( _dest.data(), &buff_dest ) != -1 );
848
 
    if ( dest_exists )
849
 
    {
850
 
        if (S_ISDIR(buff_dest.st_mode))
851
 
        {
852
 
           error( KIO::ERR_DIR_ALREADY_EXIST, _dest );
853
 
           return;
854
 
        }
855
 
 
856
 
        if ( same_inode( buff_dest, buff_src) )
857
 
        {
858
 
            error( KIO::ERR_IDENTICAL_FILES, _dest );
859
 
            return;
860
 
        }
861
 
 
862
 
        if (!(_flags & KIO::Overwrite))
863
 
        {
864
 
           error( KIO::ERR_FILE_ALREADY_EXIST, _dest );
865
 
           return;
866
 
        }
867
 
 
868
 
        // If the destination is a symlink and overwrite is TRUE,
869
 
        // remove the symlink first to prevent the scenario where
870
 
        // the symlink actually points to current source!
871
 
        if ((_flags & KIO::Overwrite) && S_ISLNK(buff_dest.st_mode))
872
 
        {
873
 
            //kDebug(7101) << "copy(): LINK DESTINATION";
874
 
            remove( _dest.data() );
875
 
        }
876
 
    }
877
 
 
878
 
    int src_fd = KDE_open( _src.data(), O_RDONLY);
879
 
    if ( src_fd < 0 ) {
880
 
        error( KIO::ERR_CANNOT_OPEN_FOR_READING, _src );
881
 
        return;
882
 
    }
883
 
 
884
 
#ifdef HAVE_FADVISE
885
 
    posix_fadvise(src_fd,0,0,POSIX_FADV_SEQUENTIAL);
886
 
#endif
887
 
    // WABA: Make sure that we keep writing permissions ourselves,
888
 
    // otherwise we can be in for a surprise on NFS.
889
 
    mode_t initialMode;
890
 
    if (_mode != -1)
891
 
       initialMode = _mode | S_IWUSR;
892
 
    else
893
 
       initialMode = 0666;
894
 
 
895
 
    int dest_fd = KDE_open(_dest.data(), O_CREAT | O_TRUNC | O_WRONLY, initialMode);
896
 
    if ( dest_fd < 0 ) {
897
 
        kDebug(7101) << "###### COULD NOT WRITE " << dest.url();
898
 
        if ( errno == EACCES ) {
899
 
            error( KIO::ERR_WRITE_ACCESS_DENIED, _dest );
900
 
        } else {
901
 
            error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, _dest );
902
 
        }
903
 
        ::close(src_fd);
904
 
        return;
905
 
    }
906
 
 
907
 
#ifdef HAVE_FADVISE
908
 
    posix_fadvise(dest_fd,0,0,POSIX_FADV_SEQUENTIAL);
909
 
#endif
910
 
 
911
 
#ifdef HAVE_POSIX_ACL
912
 
    acl = acl_get_fd(src_fd);
913
 
    if ( acl && !isExtendedACL( acl ) ) {
914
 
        kDebug(7101) << _dest.data() << " doesn't have extended ACL";
915
 
        acl_free( acl );
916
 
        acl = NULL;
917
 
    }
918
 
#endif
919
 
    totalSize( buff_src.st_size );
920
 
 
921
 
    KIO::filesize_t processed_size = 0;
922
 
    char buffer[ MAX_IPC_SIZE ];
923
 
    int n;
924
 
#ifdef USE_SENDFILE
925
 
    bool use_sendfile=buff_src.st_size < 0x7FFFFFFF;
926
 
#endif
927
 
    while( 1 )
928
 
    {
929
 
#ifdef USE_SENDFILE
930
 
       if (use_sendfile) {
931
 
            off_t sf = processed_size;
932
 
            n = KDE_sendfile( dest_fd, src_fd, &sf, MAX_IPC_SIZE );
933
 
            processed_size = sf;
934
 
            if ( n == -1 && ( errno == EINVAL || errno == ENOSYS ) ) { //not all filesystems support sendfile()
935
 
                kDebug(7101) << "sendfile() not supported, falling back ";
936
 
                use_sendfile = false;
937
 
            }
938
 
       }
939
 
       if (!use_sendfile)
940
 
#endif
941
 
        n = ::read( src_fd, buffer, MAX_IPC_SIZE );
942
 
 
943
 
       if (n == -1)
944
 
       {
945
 
          if (errno == EINTR)
946
 
              continue;
947
 
#ifdef USE_SENDFILE
948
 
          if ( use_sendfile ) {
949
 
            kDebug(7101) << "sendfile() error:" << strerror(errno);
950
 
            if ( errno == ENOSPC ) // disk full
951
 
            {
952
 
                error( KIO::ERR_DISK_FULL, _dest );
953
 
                remove( _dest.data() );
954
 
            }
955
 
            else {
956
 
                error( KIO::ERR_SLAVE_DEFINED,
957
 
                        i18n("Cannot copy file from %1 to %2. (Errno: %3)",
958
 
                          src.toLocalFile(), dest.toLocalFile(), errno ) );
959
 
            }
960
 
          } else
961
 
#endif
962
 
          error( KIO::ERR_COULD_NOT_READ, _src );
963
 
          ::close(src_fd);
964
 
          ::close(dest_fd);
965
 
#ifdef HAVE_POSIX_ACL
966
 
          if (acl) acl_free(acl);
967
 
#endif
968
 
          return;
969
 
       }
970
 
       if (n == 0)
971
 
          break; // Finished
972
 
#ifdef USE_SENDFILE
973
 
       if ( !use_sendfile ) {
974
 
#endif
975
 
         if (write_all( dest_fd, buffer, n))
976
 
         {
977
 
           ::close(src_fd);
978
 
           ::close(dest_fd);
979
 
 
980
 
           if ( errno == ENOSPC ) // disk full
981
 
           {
982
 
              error( KIO::ERR_DISK_FULL, _dest );
983
 
              remove( _dest.data() );
984
 
           }
985
 
           else
986
 
           {
987
 
              kWarning(7101) << "Couldn't write[2]. Error:" << strerror(errno);
988
 
              error( KIO::ERR_COULD_NOT_WRITE, _dest );
989
 
           }
990
 
#ifdef HAVE_POSIX_ACL
991
 
           if (acl) acl_free(acl);
992
 
#endif
993
 
           return;
994
 
         }
995
 
         processed_size += n;
996
 
#ifdef USE_SENDFILE
997
 
       }
998
 
#endif
999
 
       processedSize( processed_size );
1000
 
    }
1001
 
 
1002
 
    ::close( src_fd );
1003
 
 
1004
 
    if (::close( dest_fd))
1005
 
    {
1006
 
        kWarning(7101) << "Error when closing file descriptor[2]:" << strerror(errno);
1007
 
        error( KIO::ERR_COULD_NOT_WRITE, _dest );
1008
 
#ifdef HAVE_POSIX_ACL
1009
 
        if (acl) acl_free(acl);
1010
 
#endif
1011
 
        return;
1012
 
    }
1013
 
 
1014
 
    // set final permissions
1015
 
    if ( _mode != -1 )
1016
 
    {
1017
 
        if ( (::chmod(_dest.data(), _mode) != 0)
1018
 
#ifdef HAVE_POSIX_ACL
1019
 
          || (acl && acl_set_file(_dest.data(), ACL_TYPE_ACCESS, acl) != 0)
1020
 
#endif
1021
 
        )
1022
 
       {
1023
 
           KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(_dest);
1024
 
           // Eat the error if the filesystem apparently doesn't support chmod.
1025
 
           if ( mp && mp->testFileSystemFlag( KMountPoint::SupportsChmod ) )
1026
 
               warning( i18n( "Could not change permissions for\n%1" ,  dest.toLocalFile() ) );
1027
 
       }
1028
 
    }
1029
 
#ifdef HAVE_POSIX_ACL
1030
 
    if (acl) acl_free(acl);
1031
 
#endif
1032
 
 
1033
 
    // copy access and modification time
1034
 
    struct utimbuf ut;
1035
 
    ut.actime = buff_src.st_atime;
1036
 
    ut.modtime = buff_src.st_mtime;
1037
 
    if ( ::utime( _dest.data(), &ut ) != 0 )
1038
 
    {
1039
 
        kWarning() << QString::fromLatin1("Couldn't preserve access and modification time for\n%1").arg( _dest.data() );
1040
 
    }
1041
 
 
1042
 
    processedSize( buff_src.st_size );
1043
 
    finished();
1044
 
}
1045
 
 
1046
 
void FileProtocol::rename( const KUrl &src, const KUrl &dest,
1047
 
                           KIO::JobFlags _flags )
1048
 
{
1049
 
    char off_t_should_be_64_bits[sizeof(off_t) >= 8 ? 1 : -1]; (void) off_t_should_be_64_bits;
1050
 
    QByteArray _src(QFile::encodeName(src.toLocalFile()));
1051
 
    QByteArray _dest(QFile::encodeName(dest.toLocalFile()));
1052
 
    KDE_struct_stat buff_src;
1053
 
    if ( KDE_lstat( _src.data(), &buff_src ) == -1 ) {
1054
 
        if ( errno == EACCES )
1055
 
           error( KIO::ERR_ACCESS_DENIED, _src );
1056
 
        else
1057
 
           error( KIO::ERR_DOES_NOT_EXIST, _src );
1058
 
        return;
1059
 
    }
1060
 
 
1061
 
    KDE_struct_stat buff_dest;
1062
 
    // stat symlinks here (lstat, not stat), to avoid ERR_IDENTICAL_FILES when replacing symlink
1063
 
    // with its target (#169547)
1064
 
    bool dest_exists = ( KDE_lstat( _dest.data(), &buff_dest ) != -1 );
1065
 
    if ( dest_exists )
1066
 
    {
1067
 
        if (S_ISDIR(buff_dest.st_mode))
1068
 
        {
1069
 
           error( KIO::ERR_DIR_ALREADY_EXIST, _dest );
1070
 
           return;
1071
 
        }
1072
 
 
1073
 
        if ( same_inode( buff_dest, buff_src) )
1074
 
        {
1075
 
            error( KIO::ERR_IDENTICAL_FILES, _dest );
1076
 
            return;
1077
 
        }
1078
 
 
1079
 
        if (!(_flags & KIO::Overwrite))
1080
 
        {
1081
 
           error( KIO::ERR_FILE_ALREADY_EXIST, _dest );
1082
 
           return;
1083
 
        }
1084
 
    }
1085
 
 
1086
 
    if ( KDE_rename( _src.data(), _dest.data()))
1087
 
    {
1088
 
        if (( errno == EACCES ) || (errno == EPERM)) {
1089
 
            error( KIO::ERR_ACCESS_DENIED, _dest );
1090
 
        }
1091
 
        else if (errno == EXDEV) {
1092
 
           error( KIO::ERR_UNSUPPORTED_ACTION, QLatin1String("rename"));
1093
 
        }
1094
 
        else if (errno == EROFS) { // The file is on a read-only filesystem
1095
 
           error( KIO::ERR_CANNOT_DELETE, _src );
1096
 
        }
1097
 
        else {
1098
 
           error( KIO::ERR_CANNOT_RENAME, _src );
1099
 
        }
1100
 
        return;
1101
 
    }
1102
 
 
1103
 
    finished();
1104
 
}
1105
 
 
1106
 
void FileProtocol::symlink( const QString &target, const KUrl &dest, KIO::JobFlags flags )
1107
 
{
1108
 
    // Assume dest is local too (wouldn't be here otherwise)
1109
 
    if ( ::symlink( QFile::encodeName( target ), QFile::encodeName( dest.path() ) ) == -1 )
1110
 
    {
1111
 
        // Does the destination already exist ?
1112
 
        if ( errno == EEXIST )
1113
 
        {
1114
 
            if ( (flags & KIO::Overwrite) )
1115
 
            {
1116
 
                // Try to delete the destination
1117
 
                if ( unlink( QFile::encodeName( dest.path() ) ) != 0 )
1118
 
                {
1119
 
                    error( KIO::ERR_CANNOT_DELETE, dest.path() );
1120
 
                    return;
1121
 
                }
1122
 
                // Try again - this won't loop forever since unlink succeeded
1123
 
                symlink( target, dest, flags );
1124
 
            }
1125
 
            else
1126
 
            {
1127
 
                KDE_struct_stat buff_dest;
1128
 
                KDE_lstat( QFile::encodeName( dest.path() ), &buff_dest );
1129
 
                if (S_ISDIR(buff_dest.st_mode))
1130
 
                    error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() );
1131
 
                else
1132
 
                    error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() );
1133
 
                return;
1134
 
            }
1135
 
        }
1136
 
        else
1137
 
        {
1138
 
            // Some error occurred while we tried to symlink
1139
 
            error( KIO::ERR_CANNOT_SYMLINK, dest.path() );
1140
 
            return;
1141
 
        }
1142
 
    }
1143
 
    finished();
1144
 
}
1145
 
 
1146
 
void FileProtocol::del( const KUrl& url, bool isfile)
1147
 
{
1148
 
    QByteArray _path( QFile::encodeName(url.toLocalFile()));
1149
 
    /*****
1150
 
     * Delete files
1151
 
     *****/
1152
 
 
1153
 
    if (isfile) {
1154
 
        kDebug( 7101 ) <<  "Deleting file "<< url.url();
1155
 
 
1156
 
        // TODO deletingFile( source );
1157
 
 
1158
 
        if ( unlink( _path.data() ) == -1 ) {
1159
 
            if ((errno == EACCES) || (errno == EPERM))
1160
 
               error( KIO::ERR_ACCESS_DENIED, _path );
1161
 
            else if (errno == EISDIR)
1162
 
               error( KIO::ERR_IS_DIRECTORY, _path );
1163
 
            else
1164
 
               error( KIO::ERR_CANNOT_DELETE, _path );
1165
 
            return;
1166
 
        }
1167
 
    } else {
1168
 
 
1169
 
      /*****
1170
 
       * Delete empty directory
1171
 
       *****/
1172
 
 
1173
 
      kDebug( 7101 ) << "Deleting directory " << url.url();
1174
 
 
1175
 
      if ( ::rmdir( _path.data() ) == -1 ) {
1176
 
        if ((errno == EACCES) || (errno == EPERM))
1177
 
          error( KIO::ERR_ACCESS_DENIED, _path );
1178
 
        else {
1179
 
          kDebug( 7101 ) << "could not rmdir " << perror;
1180
 
          error( KIO::ERR_COULD_NOT_RMDIR, _path );
1181
 
          return;
1182
 
        }
1183
 
      }
1184
 
    }
1185
 
 
1186
 
    finished();
1187
 
}
1188
 
 
1189
 
#endif  // Q_OS_WIN
1190
 
 
1191
750
QString FileProtocol::getUserName( uid_t uid ) const
1192
751
{
1193
752
    if ( !mUsercache.contains( uid ) ) {
1337
896
    finished();
1338
897
}
1339
898
 
1340
 
#ifndef Q_OS_WIN
1341
 
void FileProtocol::listDir( const KUrl& url)
1342
 
{
1343
 
    kDebug(7101) << "========= LIST " << url.url() << " =========";
1344
 
    if (!url.isLocalFile()) {
1345
 
        KUrl redir(url);
1346
 
        redir.setProtocol(config()->readEntry("DefaultRemoteProtocol", "smb"));
1347
 
        redirection(redir);
1348
 
        kDebug(7101) << "redirecting to " << redir.url();
1349
 
        finished();
1350
 
        return;
1351
 
    }
1352
 
    QByteArray _path( QFile::encodeName(url.toLocalFile()) );
1353
 
    KDE_struct_stat buff;
1354
 
    if ( KDE_stat( _path.data(), &buff ) == -1 ) {
1355
 
        error( KIO::ERR_DOES_NOT_EXIST, _path );
1356
 
        return;
1357
 
    }
1358
 
 
1359
 
    if ( !S_ISDIR( buff.st_mode ) ) {
1360
 
        error( KIO::ERR_IS_FILE, _path );
1361
 
        return;
1362
 
    }
1363
 
 
1364
 
    DIR *dp = 0L;
1365
 
    KDE_struct_dirent *ep;
1366
 
 
1367
 
    dp = opendir( _path.data() );
1368
 
    if ( dp == 0 ) {
1369
 
        switch (errno)
1370
 
        {
1371
 
#ifdef ENOMEDIUM
1372
 
        case ENOMEDIUM:
1373
 
            error( ERR_SLAVE_DEFINED,
1374
 
                   i18n( "No media in device for %1", url.toLocalFile() ) );
1375
 
            break;
1376
 
#else
1377
 
        case ENOENT: // just to avoid the warning
1378
 
#endif
1379
 
        default:
1380
 
            error( KIO::ERR_CANNOT_ENTER_DIRECTORY, _path );
1381
 
            break;
1382
 
        }
1383
 
        return;
1384
 
    }
1385
 
 
1386
 
    // Don't make this a QStringList. The locale file name we get here
1387
 
    // should be passed intact to createUDSEntry to avoid problems with
1388
 
    // files where QFile::encodeName(QFile::decodeName(a)) != a.
1389
 
    QList<QByteArray> entryNames;
1390
 
    while ( ( ep = KDE_readdir( dp ) ) != 0L )
1391
 
        entryNames.append( ep->d_name );
1392
 
 
1393
 
    closedir( dp );
1394
 
    totalSize( entryNames.count() );
1395
 
 
1396
 
    /* set the current dir to the path to speed up
1397
 
       in not having to pass an absolute path.
1398
 
       We restore the path later to get out of the
1399
 
       path - the kernel wouldn't unmount or delete
1400
 
       directories we keep as active directory. And
1401
 
       as the slave runs in the background, it's hard
1402
 
       to see for the user what the problem would be */
1403
 
    char path_buffer[PATH_MAX];
1404
 
    getcwd(path_buffer, PATH_MAX - 1);
1405
 
    if ( chdir( _path.data() ) )  {
1406
 
        if (errno == EACCES)
1407
 
            error(ERR_ACCESS_DENIED, _path);
1408
 
        else
1409
 
            error(ERR_CANNOT_ENTER_DIRECTORY, _path);
1410
 
        finished();
1411
 
    }
1412
 
 
1413
 
    UDSEntry entry;
1414
 
    QList<QByteArray>::ConstIterator it = entryNames.constBegin();
1415
 
    QList<QByteArray>::ConstIterator end = entryNames.constEnd();
1416
 
    for (; it != end; ++it) {
1417
 
        entry.clear();
1418
 
        if ( createUDSEntry( QFile::decodeName(*it),
1419
 
                             *it /* we can use the filename as relative path*/,
1420
 
                             entry, 2, true ) )
1421
 
          listEntry( entry, false);
1422
 
    }
1423
 
 
1424
 
    listEntry( entry, true ); // ready
1425
 
 
1426
 
    kDebug(7101) << "============= COMPLETED LIST ============";
1427
 
 
1428
 
    chdir(path_buffer);
1429
 
    finished();
1430
 
}
1431
 
#endif  // !Q_OS_WIN
1432
 
 
1433
899
/*
1434
900
void FileProtocol::testDir( const QString& path )
1435
901
{