Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-12 into lp:ubuntu-filemanager-app

2015-08-15 Thread Carlos Jose Mazieri
About the comment:
"But it's not clear to me when existing context should be closed and new 
created etc."

It is not clear to me either, I could not find good documentation of 
"libsmbclient", this source code is based on "libsmbclient" examples and some 
own tests, all operations require a "context", but it is not clear if a 
"context" can be reused for example doing a rename after writing data into a 
file, that is the reason why some methods always create a context as example in 
SmbLocationItemFile::rename(const QString& oldname, const QString& newName). 
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-12/+merge/265211
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-actions-11 into lp:ubuntu-filemanager-app

2015-08-15 Thread Carlos Jose Mazieri
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 +
> +++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp   
> 2015-07-19 15:35:10 +
> @@ -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.

-- 
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