Changeset View
Changeset View
Standalone View
Standalone View
smb/kio_smb_browse.cpp
Show First 20 Lines • Show All 486 Lines • ▼ Show 20 Line(s) | 300 | { | |||
---|---|---|---|---|---|
487 | 487 | | |||
488 | finished(); | 488 | finished(); | ||
489 | } | 489 | } | ||
490 | 490 | | |||
491 | void SMBSlave::fileSystemFreeSpace(const QUrl& url) | 491 | void SMBSlave::fileSystemFreeSpace(const QUrl& url) | ||
492 | { | 492 | { | ||
493 | qCDebug(KIO_SMB) << url; | 493 | qCDebug(KIO_SMB) << url; | ||
494 | 494 | | |||
495 | // Avoid crashing in smbc_fstatvfs below when | ||||
496 | // requesting free space for smb:// which doesn't | ||||
497 | // make sense to do to begin with | ||||
498 | if (url.host().isEmpty()) { | ||||
499 | error(KIO::ERR_COULD_NOT_STAT, url.url()); | ||||
500 | return; | ||||
501 | } | ||||
502 | | ||||
495 | SMBUrl smbcUrl = url; | 503 | SMBUrl smbcUrl = url; | ||
496 | int handle = smbc_opendir(smbcUrl.toSmbcUrl()); | 504 | int handle = smbc_opendir(smbcUrl.toSmbcUrl()); | ||
497 | if (handle < 0) { | 505 | if (handle < 0) { | ||
498 | error(KIO::ERR_COULD_NOT_STAT, url.url()); | 506 | error(KIO::ERR_COULD_NOT_STAT, url.url()); | ||
499 | return; | 507 | return; | ||
500 | } | 508 | } | ||
501 | 509 | | |||
502 | struct statvfs dirStat; | 510 | struct statvfs dirStat; | ||
Show All 27 Lines |