[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app
The proposal to merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03/+merge/273335 -- Your team Ubuntu File Manager Developers is subscribed to branch lp:ubuntu-filemanager-app. -- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app
Review: Approve -- https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03/+merge/273335 Your team Ubuntu File Manager Developers is subscribed to branch lp:ubuntu-filemanager-app. -- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp
[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app
The proposal to merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03/+merge/273335 -- Your team Ubuntu File Manager Developers is subscribed to branch lp:ubuntu-filemanager-app. -- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app
Review: Approve continuous-integration PASSED: Continuous integration, rev:476 http://91.189.93.70:8080/job/ubuntu-filemanager-app-ci/555/ Executed test runs: SUCCESS: http://91.189.93.70:8080/job/ubuntu-filemanager-app-vivid-amd64-ci/177 Click here to trigger a rebuild: http://91.189.93.70:8080/job/ubuntu-filemanager-app-ci/555/rebuild -- https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03/+merge/273335 Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app. -- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp
[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app
Carlos Jose Mazieri has proposed merging lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app with lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-02 as a prerequisite. Commit message: Improved SmbUtil::getStatInfo() to not always open Directories and Files, Directories are always attempted but Files are not necessary, Files are tried just attempted with SmbUtil:getStat(). Requested reviews: Ubuntu File Manager Developers (ubuntu-filemanager-dev) For more details, see: https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03/+merge/273335 Improved SmbUtil::getStatInfo() to not always open Directories and Files, Directories are always attempted but Files are not necessary, Files are tried just attempted with SmbUtil:getStat(). -- Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into lp:ubuntu-filemanager-app. === modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp' --- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-08-15 17:47:55 + +++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-10-04 15:47:50 + @@ -340,45 +340,28 @@ StatReturn ret = StatInvalid; int slashes = smb_path.count(QDir::separator()); Smb::FileHandler fd = 0; -// smb:// -> slahes=2 smb://workgroup -> slahes=2 smb://host/share -> slashes=3=URL_SLASHES_NUMBER_FOR_SHARES -if ((fd=openDir(context, smb_path))) -{ -if ((ret = guessDirType(context,fd)) == StatDir && slashes == URL_SLASHES_NUMBER_FOR_SHARES) -{ -ret = StatShare; -} -if (slashes >= URL_SLASHES_NUMBER_FOR_SHARES && (ret == StatShare || ret == StatDir)) -{ - /* smbc_getFunctionFstatdir does not work -ret = static_cast(::smbc_getFunctionFstatdir(context)(context,fd, st)); - */ -QString ipUrl = NetUtil::urlConvertHostnameToIP(smb_path); -if (ipUrl.isEmpty()) +::memset(st, 0, sizeof(struct stat)); +if ((fd=openDir(context, smb_path)) ) +{ +ret = guessDirType(context,fd); +closeHandle(context, fd); +if (ret == StatDir) +{ +// smb:// -> slahes=2 smb://workgroup -> slahes=2 smb://host/share -> slashes=3=URL_SLASHES_NUMBER_FOR_SHARES +if (slashes == URL_SLASHES_NUMBER_FOR_SHARES) { -ipUrl = smb_path; +ret = StatShare; } -(void)getStat(context,ipUrl, st); +(void)getStat(context,smb_path,st); } } -else -{ -// there is no indication of what the item is, directory or file -// if openDir() failed it may be a file, try openFile() -// do not try openFile() when: EACCES means it needs authentication, ECONNREFUSED means path does not exist -if (errno != EACCES && errno != ECONNREFUSED ) -{ -if ((fd = openFile(context,smb_path))) +else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file { -ret = getFstat(context,fd, st); -} -} +errno = 0; +ret = getStat(context, smb_path,st); } -if (fd) -{ -closeHandle(context, fd); -} -else +if (errno != 0) { SHOW_ERRNO(smb_path); switch(errno) -- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp