Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/file/file.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | |||||
72 | #if HAVE_VOLMGT | 72 | #if HAVE_VOLMGT | ||
73 | #include <volmgt.h> | 73 | #include <volmgt.h> | ||
74 | #include <sys/mnttab.h> | 74 | #include <sys/mnttab.h> | ||
75 | #endif | 75 | #endif | ||
76 | 76 | | |||
77 | #include <kdirnotify.h> | 77 | #include <kdirnotify.h> | ||
78 | #include <ioslave_defaults.h> | 78 | #include <ioslave_defaults.h> | ||
79 | 79 | | |||
80 | #include "fdreceiver.h" | ||||
81 | | ||||
80 | Q_LOGGING_CATEGORY(KIO_FILE, "kf5.kio.kio_file") | 82 | Q_LOGGING_CATEGORY(KIO_FILE, "kf5.kio.kio_file") | ||
81 | 83 | | |||
82 | // Pseudo plugin class to embed meta data | 84 | // Pseudo plugin class to embed meta data | ||
83 | class KIOPluginForMetaData : public QObject | 85 | class KIOPluginForMetaData : public QObject | ||
84 | { | 86 | { | ||
85 | Q_OBJECT | 87 | Q_OBJECT | ||
86 | Q_PLUGIN_METADATA(IID "org.kde.kio.slave.file" FILE "file.json") | 88 | Q_PLUGIN_METADATA(IID "org.kde.kio.slave.file" FILE "file.json") | ||
87 | }; | 89 | }; | ||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | 230 | #ifdef Q_OS_UNIX | |||
229 | // QFile::Permissions does not support special attributes like sticky | 231 | // QFile::Permissions does not support special attributes like sticky | ||
230 | if (::chmod(_path.constData(), permissions) == -1 || | 232 | if (::chmod(_path.constData(), permissions) == -1 || | ||
231 | #else | 233 | #else | ||
232 | if (!QFile::setPermissions(path, modeToQFilePermissions(permissions)) || | 234 | if (!QFile::setPermissions(path, modeToQFilePermissions(permissions)) || | ||
233 | #endif | 235 | #endif | ||
234 | (setACL(_path.data(), permissions, false) == -1) || | 236 | (setACL(_path.data(), permissions, false) == -1) || | ||
235 | /* if not a directory, cannot set default ACLs */ | 237 | /* if not a directory, cannot set default ACLs */ | ||
236 | (setACL(_path.data(), permissions, true) == -1 && errno != ENOTDIR)) { | 238 | (setACL(_path.data(), permissions, true) == -1 && errno != ENOTDIR)) { | ||
237 | 239 | if (auto err = execWithElevatedPrivilege(CHMOD, _path, permissions)) { | |||
240 | if (!err.wasCanceled()) { | ||||
238 | switch (errno) { | 241 | switch (errno) { | ||
239 | case EPERM: | 242 | case EPERM: | ||
240 | case EACCES: | 243 | case EACCES: | ||
241 | error(KIO::ERR_ACCESS_DENIED, path); | 244 | error(KIO::ERR_ACCESS_DENIED, path); | ||
242 | break; | 245 | break; | ||
243 | #if defined(ENOTSUP) | 246 | #if defined(ENOTSUP) | ||
244 | case ENOTSUP: // from setACL since chmod can't return ENOTSUP | 247 | case ENOTSUP: // from setACL since chmod can't return ENOTSUP | ||
245 | error(KIO::ERR_UNSUPPORTED_ACTION, i18n("Setting ACL for %1", path)); | 248 | error(KIO::ERR_UNSUPPORTED_ACTION, i18n("Setting ACL for %1", path)); | ||
246 | break; | 249 | break; | ||
247 | #endif | 250 | #endif | ||
248 | case ENOSPC: | 251 | case ENOSPC: | ||
249 | error(KIO::ERR_DISK_FULL, path); | 252 | error(KIO::ERR_DISK_FULL, path); | ||
250 | break; | 253 | break; | ||
251 | default: | 254 | default: | ||
252 | error(KIO::ERR_CANNOT_CHMOD, path); | 255 | error(KIO::ERR_CANNOT_CHMOD, path); | ||
253 | } | 256 | } | ||
254 | } else { | 257 | return; | ||
255 | finished(); | 258 | } | ||
256 | } | 259 | } | ||
257 | } | 260 | } | ||
258 | 261 | | |||
262 | finished(); | ||||
263 | } | ||||
264 | | ||||
259 | void FileProtocol::setModificationTime(const QUrl &url, const QDateTime &mtime) | 265 | void FileProtocol::setModificationTime(const QUrl &url, const QDateTime &mtime) | ||
260 | { | 266 | { | ||
261 | const QString path(url.toLocalFile()); | 267 | const QString path(url.toLocalFile()); | ||
262 | QT_STATBUF statbuf; | 268 | QT_STATBUF statbuf; | ||
263 | if (QT_LSTAT(QFile::encodeName(path).constData(), &statbuf) == 0) { | 269 | if (QT_LSTAT(QFile::encodeName(path).constData(), &statbuf) == 0) { | ||
264 | struct utimbuf utbuf; | 270 | struct utimbuf utbuf; | ||
265 | utbuf.actime = statbuf.st_atime; // access time, unchanged | 271 | utbuf.actime = statbuf.st_atime; // access time, unchanged | ||
266 | utbuf.modtime = mtime.toTime_t(); // modification time | 272 | utbuf.modtime = mtime.toTime_t(); // modification time | ||
267 | if (::utime(QFile::encodeName(path).constData(), &utbuf) != 0) { | 273 | if (::utime(QFile::encodeName(path).constData(), &utbuf) != 0) { | ||
274 | if (auto err = execWithElevatedPrivilege(UTIME, path, qint64(utbuf.actime), qint64(utbuf.modtime))) { | ||||
275 | if (!err.wasCanceled()) { | ||||
268 | // TODO: errno could be EACCES, EPERM, EROFS | 276 | // TODO: errno could be EACCES, EPERM, EROFS | ||
269 | error(KIO::ERR_CANNOT_SETTIME, path); | 277 | error(KIO::ERR_CANNOT_SETTIME, path); | ||
278 | } | ||||
279 | } | ||||
270 | } else { | 280 | } else { | ||
271 | finished(); | 281 | finished(); | ||
272 | } | 282 | } | ||
273 | } else { | 283 | } else { | ||
274 | error(KIO::ERR_DOES_NOT_EXIST, path); | 284 | error(KIO::ERR_DOES_NOT_EXIST, path); | ||
275 | } | 285 | } | ||
276 | } | 286 | } | ||
277 | 287 | | |||
278 | void FileProtocol::mkdir(const QUrl &url, int permissions) | 288 | void FileProtocol::mkdir(const QUrl &url, int permissions) | ||
279 | { | 289 | { | ||
280 | const QString path(url.toLocalFile()); | 290 | const QString path(url.toLocalFile()); | ||
281 | 291 | | |||
282 | // qDebug() << path << "permission=" << permissions; | 292 | // qDebug() << path << "permission=" << permissions; | ||
283 | 293 | | |||
284 | // Remove existing file or symlink, if requested (#151851) | 294 | // Remove existing file or symlink, if requested (#151851) | ||
285 | if (metaData(QStringLiteral("overwrite")) == QLatin1String("true")) { | 295 | if (metaData(QStringLiteral("overwrite")) == QLatin1String("true")) { | ||
286 | QFile::remove(path); | 296 | if (!QFile::remove(path)) { | ||
297 | execWithElevatedPrivilege(DEL, path); | ||||
298 | } | ||||
287 | } | 299 | } | ||
288 | 300 | | |||
289 | QT_STATBUF buff; | 301 | QT_STATBUF buff; | ||
290 | if (QT_LSTAT(QFile::encodeName(path).constData(), &buff) == -1) { | 302 | if (QT_LSTAT(QFile::encodeName(path).constData(), &buff) == -1) { | ||
291 | if (!QDir().mkdir(path)) { | 303 | bool dirCreated; | ||
304 | if (!(dirCreated = QDir().mkdir(path))) { | ||||
305 | if (auto err = execWithElevatedPrivilege(MKDIR, path)) { | ||||
306 | if (!err.wasCanceled()) { | ||||
292 | //TODO: add access denied & disk full (or another reasons) handling (into Qt, possibly) | 307 | //TODO: add access denied & disk full (or another reasons) handling (into Qt, possibly) | ||
293 | error(KIO::ERR_CANNOT_MKDIR, path); | 308 | error(KIO::ERR_CANNOT_MKDIR, path); | ||
309 | } | ||||
294 | return; | 310 | return; | ||
295 | } else { | 311 | } | ||
312 | dirCreated = true; | ||||
313 | } | ||||
314 | | ||||
315 | if (dirCreated) { | ||||
296 | if (permissions != -1) { | 316 | if (permissions != -1) { | ||
297 | chmod(url, permissions); | 317 | chmod(url, permissions); | ||
298 | } else { | 318 | } else { | ||
299 | finished(); | 319 | finished(); | ||
300 | } | 320 | } | ||
301 | return; | 321 | return; | ||
302 | } | 322 | } | ||
303 | } | 323 | } | ||
Show All 34 Lines | 335 | { | |||
338 | } | 358 | } | ||
339 | if ((buff.st_mode & QT_STAT_MASK) != QT_STAT_REG) { | 359 | if ((buff.st_mode & QT_STAT_MASK) != QT_STAT_REG) { | ||
340 | error(KIO::ERR_CANNOT_OPEN_FOR_READING, path); | 360 | error(KIO::ERR_CANNOT_OPEN_FOR_READING, path); | ||
341 | return; | 361 | return; | ||
342 | } | 362 | } | ||
343 | 363 | | |||
344 | QFile f(path); | 364 | QFile f(path); | ||
345 | if (!f.open(QIODevice::ReadOnly)) { | 365 | if (!f.open(QIODevice::ReadOnly)) { | ||
366 | if (auto err = tryOpen(f, QFile::encodeName(path), O_RDONLY, S_IRUSR)) { | ||||
367 | if (!err.wasCanceled()) { | ||||
346 | error(KIO::ERR_CANNOT_OPEN_FOR_READING, path); | 368 | error(KIO::ERR_CANNOT_OPEN_FOR_READING, path); | ||
369 | } | ||||
347 | return; | 370 | return; | ||
348 | } | 371 | } | ||
372 | } | ||||
349 | 373 | | |||
350 | #if HAVE_FADVISE | 374 | #if HAVE_FADVISE | ||
351 | //TODO check return code | 375 | //TODO check return code | ||
352 | posix_fadvise(f.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); | 376 | posix_fadvise(f.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); | ||
353 | #endif | 377 | #endif | ||
354 | 378 | | |||
355 | // Determine the mimetype of the file to be retrieved, and emit it. | 379 | // Determine the mimetype of the file to be retrieved, and emit it. | ||
356 | // This is mandatory in all slaves (for KRun/BrowserRun to work) | 380 | // This is mandatory in all slaves (for KRun/BrowserRun to work) | ||
▲ Show 20 Lines • Show All 176 Lines • ▼ Show 20 Line(s) | 553 | { | |||
533 | delete mFile; | 557 | delete mFile; | ||
534 | mFile = nullptr; | 558 | mFile = nullptr; | ||
535 | 559 | | |||
536 | finished(); | 560 | finished(); | ||
537 | } | 561 | } | ||
538 | 562 | | |||
539 | void FileProtocol::put(const QUrl &url, int _mode, KIO::JobFlags _flags) | 563 | void FileProtocol::put(const QUrl &url, int _mode, KIO::JobFlags _flags) | ||
540 | { | 564 | { | ||
565 | if (privilegeOperationUnitTestMode()) { | ||||
566 | finished(); | ||||
567 | return; | ||||
568 | } | ||||
569 | | ||||
541 | const QString dest_orig = url.toLocalFile(); | 570 | const QString dest_orig = url.toLocalFile(); | ||
542 | 571 | | |||
543 | // qDebug() << dest_orig << "mode=" << _mode; | 572 | // qDebug() << dest_orig << "mode=" << _mode; | ||
544 | 573 | | |||
545 | QString dest_part(dest_orig + QLatin1String(".part")); | 574 | QString dest_part(dest_orig + QLatin1String(".part")); | ||
546 | 575 | | |||
547 | QT_STATBUF buff_orig; | 576 | QT_STATBUF buff_orig; | ||
548 | const bool bOrigExists = (QT_LSTAT(QFile::encodeName(dest_orig).constData(), &buff_orig) != -1); | 577 | const bool bOrigExists = (QT_LSTAT(QFile::encodeName(dest_orig).constData(), &buff_orig) != -1); | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 642 | if (_mode != -1) { | |||
614 | // WABA: Make sure that we keep writing permissions ourselves, | 643 | // WABA: Make sure that we keep writing permissions ourselves, | ||
615 | // otherwise we can be in for a surprise on NFS. | 644 | // otherwise we can be in for a surprise on NFS. | ||
616 | mode_t initialMode = _mode | S_IWUSR | S_IRUSR; | 645 | mode_t initialMode = _mode | S_IWUSR | S_IRUSR; | ||
617 | f.setPermissions(modeToQFilePermissions(initialMode)); | 646 | f.setPermissions(modeToQFilePermissions(initialMode)); | ||
618 | } | 647 | } | ||
619 | } | 648 | } | ||
620 | 649 | | |||
621 | if (!f.isOpen()) { | 650 | if (!f.isOpen()) { | ||
651 | int oflags = 0; | ||||
652 | int filemode = _mode; | ||||
653 | | ||||
654 | if ((_flags & KIO::Resume)) { | ||||
655 | oflags = O_RDWR | O_APPEND; | ||||
656 | } else { | ||||
657 | oflags = O_WRONLY | O_TRUNC | O_CREAT; | ||||
658 | if (_mode != -1) { | ||||
659 | filemode = _mode | S_IWUSR | S_IRUSR; | ||||
660 | } | ||||
661 | } | ||||
662 | | ||||
663 | if (auto err = tryOpen(f, QFile::encodeName(dest), oflags, filemode)) { | ||||
664 | if (!err.wasCanceled()) { | ||||
622 | // qDebug() << "####################### COULD NOT WRITE" << dest << "_mode=" << _mode; | 665 | // qDebug() << "####################### COULD NOT WRITE" << dest << "_mode=" << _mode; | ||
623 | // qDebug() << "QFile error==" << f.error() << "(" << f.errorString() << ")"; | 666 | // qDebug() << "QFile error==" << f.error() << "(" << f.errorString() << ")"; | ||
624 | 667 | | |||
625 | if (f.error() == QFileDevice::PermissionsError) { | 668 | if (f.error() == QFileDevice::PermissionsError) { | ||
626 | error(KIO::ERR_WRITE_ACCESS_DENIED, dest); | 669 | error(KIO::ERR_WRITE_ACCESS_DENIED, dest); | ||
627 | } else { | 670 | } else { | ||
628 | error(KIO::ERR_CANNOT_OPEN_FOR_WRITING, dest); | 671 | error(KIO::ERR_CANNOT_OPEN_FOR_WRITING, dest); | ||
629 | } | 672 | } | ||
673 | } | ||||
630 | return; | 674 | return; | ||
675 | } else { | ||||
676 | if ((_flags & KIO::Resume)) { | ||||
677 | execWithElevatedPrivilege(CHOWN, dest, getuid(), getgid()); | ||||
678 | QFile::setPermissions(dest, modeToQFilePermissions(filemode)); | ||||
679 | } | ||||
680 | } | ||||
631 | } | 681 | } | ||
632 | } | 682 | } | ||
633 | 683 | | |||
634 | if (f.write(buffer) == -1) { | 684 | if (f.write(buffer) == -1) { | ||
635 | if (f.error() == QFile::ResourceError) { // disk full | 685 | if (f.error() == QFile::ResourceError) { // disk full | ||
636 | error(KIO::ERR_DISK_FULL, dest_orig); | 686 | error(KIO::ERR_DISK_FULL, dest_orig); | ||
637 | result = -2; // means: remove dest file | 687 | result = -2; // means: remove dest file | ||
638 | } else { | 688 | } else { | ||
Show All 37 Lines | 723 | if (f.error() != QFile::NoError) { | |||
676 | return; | 726 | return; | ||
677 | } | 727 | } | ||
678 | 728 | | |||
679 | // after full download rename the file back to original name | 729 | // after full download rename the file back to original name | ||
680 | if (bMarkPartial) { | 730 | if (bMarkPartial) { | ||
681 | //QFile::rename() never overwrites the destination file unlike ::remove, | 731 | //QFile::rename() never overwrites the destination file unlike ::remove, | ||
682 | //so we must remove it manually first | 732 | //so we must remove it manually first | ||
683 | if (_flags & KIO::Overwrite) { | 733 | if (_flags & KIO::Overwrite) { | ||
684 | QFile::remove(dest_orig); | 734 | if (!QFile::remove(dest_orig)) { | ||
735 | execWithElevatedPrivilege(DEL, dest_orig); | ||||
736 | } | ||||
685 | } | 737 | } | ||
686 | 738 | | |||
687 | if (!QFile::rename(dest, dest_orig)) { | 739 | if (!QFile::rename(dest, dest_orig)) { | ||
740 | if (auto err = execWithElevatedPrivilege(RENAME, dest, dest_orig)) { | ||||
741 | if (!err.wasCanceled()) { | ||||
688 | qCWarning(KIO_FILE) << " Couldn't rename " << dest << " to " << dest_orig; | 742 | qCWarning(KIO_FILE) << " Couldn't rename " << dest << " to " << dest_orig; | ||
689 | error(KIO::ERR_CANNOT_RENAME_PARTIAL, dest_orig); | 743 | error(KIO::ERR_CANNOT_RENAME_PARTIAL, dest_orig); | ||
744 | } | ||||
690 | return; | 745 | return; | ||
691 | } | 746 | } | ||
747 | } | ||||
692 | org::kde::KDirNotify::emitFileRenamed(QUrl::fromLocalFile(dest), QUrl::fromLocalFile(dest_orig)); | 748 | org::kde::KDirNotify::emitFileRenamed(QUrl::fromLocalFile(dest), QUrl::fromLocalFile(dest_orig)); | ||
693 | } | 749 | } | ||
694 | 750 | | |||
695 | // set final permissions | 751 | // set final permissions | ||
696 | if (_mode != -1 && !(_flags & KIO::Resume)) { | 752 | if (_mode != -1 && !(_flags & KIO::Resume)) { | ||
697 | if (!QFile::setPermissions(dest_orig, modeToQFilePermissions(_mode))) { | 753 | if (!QFile::setPermissions(dest_orig, modeToQFilePermissions(_mode))) { | ||
698 | // couldn't chmod. Eat the error if the filesystem apparently doesn't support it. | 754 | // couldn't chmod. Eat the error if the filesystem apparently doesn't support it. | ||
699 | KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(dest_orig); | 755 | if (tryChangeFileAttr(CHMOD, dest_orig, _mode)) { | ||
700 | if (mp && mp->testFileSystemFlag(KMountPoint::SupportsChmod)) { | | |||
701 | warning(i18n("Could not change permissions for\n%1", dest_orig)); | 756 | warning(i18n("Could not change permissions for\n%1", dest_orig)); | ||
702 | } | 757 | } | ||
703 | } | 758 | } | ||
704 | } | 759 | } | ||
705 | 760 | | |||
706 | // set modification time | 761 | // set modification time | ||
707 | const QString mtimeStr = metaData(QStringLiteral("modified")); | 762 | const QString mtimeStr = metaData(QStringLiteral("modified")); | ||
708 | if (!mtimeStr.isEmpty()) { | 763 | if (!mtimeStr.isEmpty()) { | ||
Show All 9 Lines | 768 | #ifndef Q_OS_WIN | |||
718 | // modification time | 773 | // modification time | ||
719 | utbuf[1].tv_sec = dt.toTime_t(); | 774 | utbuf[1].tv_sec = dt.toTime_t(); | ||
720 | utbuf[1].tv_usec = dt.time().msec() * 1000; | 775 | utbuf[1].tv_usec = dt.time().msec() * 1000; | ||
721 | utimes(QFile::encodeName(dest_orig).constData(), utbuf); | 776 | utimes(QFile::encodeName(dest_orig).constData(), utbuf); | ||
722 | #else | 777 | #else | ||
723 | struct utimbuf utbuf; | 778 | struct utimbuf utbuf; | ||
724 | utbuf.actime = dest_statbuf.st_atime; | 779 | utbuf.actime = dest_statbuf.st_atime; | ||
725 | utbuf.modtime = dt.toTime_t(); | 780 | utbuf.modtime = dt.toTime_t(); | ||
726 | utime(QFile::encodeName(dest_orig).constData(), &utbuf); | 781 | if (utime(QFile::encodeName(dest_orig).constData(), &utbuf) != 0) { | ||
782 | tryChangeFileAttr(UTIME, dest_orig, qint64(utbuf.actime), qint64(utbuf.modtime)); | ||||
783 | } | ||||
727 | #endif | 784 | #endif | ||
728 | } | 785 | } | ||
729 | } | 786 | } | ||
730 | 787 | | |||
731 | } | 788 | } | ||
732 | 789 | | |||
733 | // We have done our job => finish | 790 | // We have done our job => finish | ||
734 | finished(); | 791 | finished(); | ||
▲ Show 20 Lines • Show All 595 Lines • ▼ Show 20 Line(s) | 1386 | while (it.hasNext()) { | |||
1330 | const QString itemPath = it.next(); | 1387 | const QString itemPath = it.next(); | ||
1331 | //qDebug() << "itemPath=" << itemPath; | 1388 | //qDebug() << "itemPath=" << itemPath; | ||
1332 | const QFileInfo info = it.fileInfo(); | 1389 | const QFileInfo info = it.fileInfo(); | ||
1333 | if (info.isDir() && !info.isSymLink()) { | 1390 | if (info.isDir() && !info.isSymLink()) { | ||
1334 | dirsToDelete.prepend(itemPath); | 1391 | dirsToDelete.prepend(itemPath); | ||
1335 | } else { | 1392 | } else { | ||
1336 | //qDebug() << "QFile::remove" << itemPath; | 1393 | //qDebug() << "QFile::remove" << itemPath; | ||
1337 | if (!QFile::remove(itemPath)) { | 1394 | if (!QFile::remove(itemPath)) { | ||
1395 | if (auto err = execWithElevatedPrivilege(DEL, itemPath)) { | ||||
1396 | if (!err.wasCanceled()) { | ||||
1338 | error(KIO::ERR_CANNOT_DELETE, itemPath); | 1397 | error(KIO::ERR_CANNOT_DELETE, itemPath); | ||
1398 | } | ||||
1339 | return false; | 1399 | return false; | ||
1340 | } | 1400 | } | ||
1341 | } | 1401 | } | ||
1342 | } | 1402 | } | ||
1403 | } | ||||
1343 | QDir dir; | 1404 | QDir dir; | ||
1344 | Q_FOREACH (const QString &itemPath, dirsToDelete) { | 1405 | Q_FOREACH (const QString &itemPath, dirsToDelete) { | ||
1345 | //qDebug() << "QDir::rmdir" << itemPath; | 1406 | //qDebug() << "QDir::rmdir" << itemPath; | ||
1346 | if (!dir.rmdir(itemPath)) { | 1407 | if (!dir.rmdir(itemPath)) { | ||
1408 | if (auto err = execWithElevatedPrivilege(RMDIR, itemPath)) { | ||||
1409 | if (!err.wasCanceled()) { | ||||
1347 | error(KIO::ERR_CANNOT_DELETE, itemPath); | 1410 | error(KIO::ERR_CANNOT_DELETE, itemPath); | ||
1411 | } | ||||
1348 | return false; | 1412 | return false; | ||
1349 | } | 1413 | } | ||
1350 | } | 1414 | } | ||
1415 | } | ||||
1351 | return true; | 1416 | return true; | ||
1352 | } | 1417 | } | ||
1353 | 1418 | | |||
1354 | void FileProtocol::fileSystemFreeSpace(const QUrl &url) | 1419 | void FileProtocol::fileSystemFreeSpace(const QUrl &url) | ||
1355 | { | 1420 | { | ||
1356 | if (url.isLocalFile()) { | 1421 | if (url.isLocalFile()) { | ||
1357 | const KDiskFreeSpaceInfo spaceInfo = KDiskFreeSpaceInfo::freeSpaceInfo(url.toLocalFile()); | 1422 | const KDiskFreeSpaceInfo spaceInfo = KDiskFreeSpaceInfo::freeSpaceInfo(url.toLocalFile()); | ||
1358 | if (spaceInfo.isValid()) { | 1423 | if (spaceInfo.isValid()) { | ||
Show All 27 Lines |