Uploaded image for project: 'SWORD'
  1. SWORD
  2. API-184

Unable to report total download size when installing module with sub folders

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: installmgr
    • Labels:
      None

      Description

      We have recursion in RemoteTransport::copyDirectory so we can't to report precisely how much will be downloaded bytes in case when there are sub folders in module directory.

      Look at attached patch that fixed this issue.

      Or:
      https://github.com/kalemas/sword/commit/7167f62096e8ad914e1bcd66cacb664aa92e0715

        Attachments

          Activity

          Hide
          kalemas Kostya Maslyuk added a comment -

          updated link, one can conveniently comment changed code on github
          https://github.com/kalemas/sword/commit/9eec17d9e52481b4a96ded8d1149b22f2c13d29e

          Show
          kalemas Kostya Maslyuk added a comment - updated link, one can conveniently comment changed code on github https://github.com/kalemas/sword/commit/9eec17d9e52481b4a96ded8d1149b22f2c13d29e
          Hide
          kalemas Kostya Maslyuk added a comment -

          Actual problem is that frontends installing modules with subfolders do fill the progress bar several times - for each folder in the module.

          Show
          kalemas Kostya Maslyuk added a comment - Actual problem is that frontends installing modules with subfolders do fill the progress bar several times - for each folder in the module.
          Hide
          scribe Troy A Griffitts added a comment -

          Hi Kostya,

          I reviewed your patch. My concern is that this change removes the recursion that is currently present. I like what you have done to build the entire download list before starting to download so that we can compute total size. It is clever how you push the contents to the end of the total queue as you walk so any folder entries will also be included, ad infinitum, removing the need for recursion. Great work. I am merely concerned that we've tested this well Can I just confirm with you that you've compiled this into an app and tried to download all cases (http and ftp, 1 folder level and 2+ folder level modules) and that the installed modules are identical the same modules installed with a current release.

          Thanks for the nice work.

          Show
          scribe Troy A Griffitts added a comment - Hi Kostya, I reviewed your patch. My concern is that this change removes the recursion that is currently present. I like what you have done to build the entire download list before starting to download so that we can compute total size. It is clever how you push the contents to the end of the total queue as you walk so any folder entries will also be included, ad infinitum, removing the need for recursion. Great work. I am merely concerned that we've tested this well Can I just confirm with you that you've compiled this into an app and tried to download all cases (http and ftp, 1 folder level and 2+ folder level modules) and that the installed modules are identical the same modules installed with a current release. Thanks for the nice work.
          Hide
          kalemas Kostya Maslyuk added a comment -

          Tested on:
          BibleTime Mini v1.2.1-dev with statically compiled curl-7.33.0 ftp and http support
          Windows 7 x64

          AbsMaps module was the same size in bytes and same files count. The only difference was that progress bar during installation was triggered twice without this change. The module was retrieved using FTPSource.

          For HTTP access i found only eBible.org source. I had downloaded aai2009eb with both cases and it was the same (nt.bzs, nt.bzv, nt.bzz, ot.bzv) , two files was missed according to the web version at http://ebible.org/sword/modules/texts/ztext/aai2009eb/ because of zero size. It was in both cases.

          I did not found more than one sub folder for module, i had looked locally at /home/sword/ftp/raw/modules/

          Show
          kalemas Kostya Maslyuk added a comment - Tested on: BibleTime Mini v1.2.1-dev with statically compiled curl-7.33.0 ftp and http support Windows 7 x64 AbsMaps module was the same size in bytes and same files count. The only difference was that progress bar during installation was triggered twice without this change. The module was retrieved using FTPSource. For HTTP access i found only eBible.org source. I had downloaded aai2009eb with both cases and it was the same (nt.bzs, nt.bzv, nt.bzz, ot.bzv) , two files was missed according to the web version at http://ebible.org/sword/modules/texts/ztext/aai2009eb/ because of zero size. It was in both cases. I did not found more than one sub folder for module, i had looked locally at /home/sword/ftp/raw/modules/
          Hide
          scribe Troy A Griffitts added a comment -

          Applied Kostya Maslyuk's patch to fix this issue. Thanks Kostya!
          We recurse all subfolders and build a list of files first, so we can accurately report total bytes to client.

          Show
          scribe Troy A Griffitts added a comment - Applied Kostya Maslyuk's patch to fix this issue. Thanks Kostya! We recurse all subfolders and build a list of files first, so we can accurately report total bytes to client.

            People

            • Assignee:
              scribe Troy A Griffitts
              Reporter:
              kalemas Kostya Maslyuk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: