Merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into lp:ubuntu-filemanager-app

Proposed by Carlos Jose Mazieri
Status: Superseded
Proposed branch: lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04
Merge into: lp:ubuntu-filemanager-app
Prerequisite: lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03
Diff against target: 41 lines (+7/-3)
1 file modified
src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp (+7/-3)
To merge this branch: bzr merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04
Reviewer Review Type Date Requested Status
Arto Jalkanen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+273337@code.launchpad.net

This proposal has been superseded by a proposal from 2015-10-20.

Commit message

ixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()

Description of the change

ixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()

To post a comment you must log in.
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) wrote :

Small nag: Commit message should be "Fixed" not "ixed".

review: Approve

Unmerged revisions

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-10-04 16:04:23 +0000
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-10-04 16:04:23 +0000
@@ -342,7 +342,7 @@
342 Smb::FileHandler fd = 0;342 Smb::FileHandler fd = 0;
343 ::memset(st, 0, sizeof(struct stat));343 ::memset(st, 0, sizeof(struct stat));
344 if ((fd=openDir(context, smb_path)) )344 if ((fd=openDir(context, smb_path)) )
345 {345 {
346 ret = guessDirType(context,fd);346 ret = guessDirType(context,fd);
347 closeHandle(context, fd);347 closeHandle(context, fd);
348 if (ret == StatDir)348 if (ret == StatDir)
@@ -356,7 +356,7 @@
356 }356 }
357 }357 }
358 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file358 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
359 {359 {
360 errno = 0;360 errno = 0;
361 ret = getStat(context, smb_path,st);361 ret = getStat(context, smb_path,st);
362 }362 }
@@ -636,6 +636,10 @@
636 {636 {
637 return false;637 return false;
638 }638 }
639 if (::strcmp(shareName, "ADMIN$") == 0)
640 {
641 return false;
642 }
639643
640 return true;644 return true;
641}645}
@@ -727,7 +731,7 @@
727731
728bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)732bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
729{733{
730 int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);734 int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
731 if (ret < 0)735 if (ret < 0)
732 {736 {
733 SHOW_ERRNO(smb_path);737 SHOW_ERRNO(smb_path);

Subscribers

People subscribed via source and target branches