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
1=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
2--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-10-04 16:04:23 +0000
3+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-10-04 16:04:23 +0000
4@@ -342,7 +342,7 @@
5 Smb::FileHandler fd = 0;
6 ::memset(st, 0, sizeof(struct stat));
7 if ((fd=openDir(context, smb_path)) )
8- {
9+ {
10 ret = guessDirType(context,fd);
11 closeHandle(context, fd);
12 if (ret == StatDir)
13@@ -356,7 +356,7 @@
14 }
15 }
16 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
17- {
18+ {
19 errno = 0;
20 ret = getStat(context, smb_path,st);
21 }
22@@ -636,6 +636,10 @@
23 {
24 return false;
25 }
26+ if (::strcmp(shareName, "ADMIN$") == 0)
27+ {
28+ return false;
29+ }
30
31 return true;
32 }
33@@ -727,7 +731,7 @@
34
35 bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
36 {
37- int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
38+ int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
39 if (ret < 0)
40 {
41 SHOW_ERRNO(smb_path);

Subscribers

People subscribed via source and target branches