ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04284
Re: [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-11 into lp:ubuntu-filemanager-app
About the comment:
166 if (fd == 0)
167 {
168 - fd = openFile(context, smb_path);
169 + openFile(context,smb_path);
It is really a mistake, the function still works most of the times due to next "if" that still tries to get a valid descriptor from the parent directory.
That will be fixed.
Other comment:
153 + if (!currentPathWithDot.isEmpty())
154 + {
155 + content.append(currentPathWithDot);
156 + }
157 + if (!currentpathWithDotDot.isEmpty())
158 + {
159 + content.append(currentpathWithDotDot);
160 + }
it will be improved.
Thanks.
Diff comments:
> === modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
> --- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-05-20 17:15:29 +0000
> +++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-07-19 15:35:10 +0000
> @@ -656,7 +681,18 @@
> Smb::FileHandler fd = openDir(context,smb_path);
> if (fd == 0)
> {
> - fd = openFile(context, smb_path);
> + openFile(context,smb_path);
It is a mistake, however that function works because of the next "if" that still tries to get a valid descriptor.
I am going to fix this.
Thanks.
> + }
> + if (fd == 0) // item does not exist neither dir nor file
> + {
> + //usually smb_path is a file that does not exist yet
> + //so using the path
> + int lastSlash = smb_path.lastIndexOf(QDir::separator());
> + if (lastSlash != -1)
> + {
> + QString path (smb_path.mid(0,lastSlash));
> + fd = openDir(context,path);
> + }
> }
> if (fd)
> {
--
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-11/+merge/265210
Your team Ubuntu File Manager Developers is subscribed to branch lp:ubuntu-filemanager-app.
References