Ticket #9795 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Script repository should warn user if installed in non-empty directory

Reported by: Alex Buts Owned by: Federico M Pouzols
Priority: major Milestone: Release 3.3
Component: GUI Keywords:
Cc: Blocked By:
Blocking: Tester: Roman Tolchenov

Description

Have just spoken to a user who had a problem with script repository on Unix.

Apparently, his problem was that he installed script repository in his home folder, and json files were written into /home/userName/

This way script repository consider everything that is in this folder belonging to script repository and, as you may expect, there are a lot of things there.

Fortunately, he did not have time to publish everything he has there.

Bearing in mind that the users who are using script repository may be not very experienced, this behaviour should be fixed in one of two flowing ways:

1) Script repository should warn user if found that the folder, it is tries to be installed is not empty (and not existing script repository folder).

2) Alternatively, it may just silently create a new folder if tired to be installed into non-empty folder (and there are no existing script repository folder there)

Option 2) was actually what the user I was dealing with was trying to do.

Change History

comment:1 Changed 6 years ago by Federico M Pouzols

  • Status changed from new to assigned
  • Owner set to Federico M Pouzols

comment:2 Changed 6 years ago by Federico M Pouzols

  • Status changed from assigned to inprogress

comment:3 Changed 6 years ago by Federico Montesino Pouzols

warn user if installing in non-empty dir, give choice, re #9795

Changeset: 2c3998d5e64c5fbe8481607f11cc574c0fc202c0

comment:4 Changed 6 years ago by Federico M Pouzols

  • Status changed from inprogress to verify
  • Resolution set to fixed
  • Milestone changed from Backlog to Release 3.3

I've added a warning message and yes/no question dialog that is shown if the target directory is not empty (files that start with a dot are ignored). The user can select yes (if sure about it) or no, in which case a different folder can be chosen.

To test:

If you have already installed the script repository you'll have to disable it following the instructions found here: http://www.mantidproject.org/ScriptRepository#Reseting_the_Script_Repository. After that, or if this is the first time you install the script repo in your test MantiPlot, you can follow these steps (or variations):

  • Do File->Script Repository
  • You'll get the first "Install Script Repository?" pop-up window. Click ok.
  • Select a directory that is not empty, for example your home.
  • You should be warned with a new pop-up. Here you can decide yes/no
    • If you click 'no', you'll get again the dialog to select a directory. This will happen as many times as needed.
    • If you click 'yes' then you'll be on your own.
  • Whatever choice you make, in the end you should get the .local.json and .repository.json files in the target installation directory and you should be able to download files from the repository.

comment:5 Changed 6 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:6 Changed 6 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9795_script_repo_warn_user_if_installing_non_empty_dir'

Full changeset: a1be2f04d31d04a53b5bd58026f4e18a737316cf

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10637

Note: See TracTickets for help on using tickets.