Merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-hostname-bug into lp:ubuntu-filemanager-app

Proposed by Carlos Jose Mazieri
Status: Merged
Approved by: Arto Jalkanen
Approved revision: 499
Merged at revision: 500
Proposed branch: lp:~carlos-mazieri/ubuntu-filemanager-app/samba-hostname-bug
Merge into: lp:ubuntu-filemanager-app
Diff against target: 39 lines (+13/-7)
1 file modified
src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp (+13/-7)
To merge this branch: bzr merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-hostname-bug
Reviewer Review Type Date Requested Status
Arto Jalkanen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Jenkins Bot continuous-integration Approve
Review via email: mp+276932@code.launchpad.net

Commit message

Fixed a bug #1508504 related to get the Samba hostname.
It used to get the description instead of the name.
For some cases the name is the first word in the description, so it worked in some cases.

Description of the change

Fixed a bug #1508504 related to get the Samba hostname.
It used to get the description instead of the name.
For some cases the name is the first word in the description, so it worked in some cases.

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Arto Jalkanen (ajalkane) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-11-02 20:30:00 +0000
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-11-08 12:30:55 +0000
@@ -363,8 +363,11 @@
363 }363 }
364 else if (errno != EACCES && errno != ECONNREFUSED && slashes >= URL_SLASHES_NUMBER_FOR_SHARES) // perhaps is a file364 else if (errno != EACCES && errno != ECONNREFUSED && slashes >= URL_SLASHES_NUMBER_FOR_SHARES) // perhaps is a file
365 {365 {
366 errno = 0;366 errno = 0;
367 ret = static_cast<SmbUtil::StatReturn> (getStat(context, smb_path,st));367 if (getStat(context,smb_path,st) == 0)
368 {
369 ret = StatDone;
370 }
368 }371 }
369372
370 if (errno != 0)373 if (errno != 0)
@@ -722,13 +725,16 @@
722 QString name(dirent.name);725 QString name(dirent.name);
723 host = name;726 host = name;
724 }727 }
725 QString comment(dirent.comment);728 if (host.isEmpty())
726 if (!comment.isEmpty())
727 {729 {
728 QString fullName = comment.split(QLatin1Char(' '), QString::SkipEmptyParts).first();730 QString comment(dirent.comment);
729 if (!fullName.isEmpty())731 if (!comment.isEmpty())
730 {732 {
731 host = fullName;733 QString fullName = comment.split(QLatin1Char(' '), QString::SkipEmptyParts).first();
734 if (!fullName.isEmpty())
735 {
736 host = fullName;
737 }
732 }738 }
733 }739 }
734 if (host.isEmpty())740 if (host.isEmpty())

Subscribers

People subscribed via source and target branches