ome / omero-downloader

An OMERO client for downloading data in bulk from the server.
https://www.openmicroscopy.org/omero/apps/
GNU General Public License v2.0
4 stars 5 forks source link

Allow download when symlinks cannot be made. #16

Closed mtbc closed 5 years ago

mtbc commented 5 years ago

With -f binary,companion links are made from Fileset/ and Image/ unless -l none is specified. This option must be specified for some regular Windows users because they do not have permission to link files!

This PR makes for a softer landing in situations like https://github.com/ome/omero-downloader/pull/6#issuecomment-458059256 such that it warns then still performs the download into Repository/ without making the user specify -l none explicitly.

If reviewing the code diff, probably easier as separate commits as a large one is whitespace-only. The refactoring was to ensure that finally blocks would be executed.

dominikl commented 5 years ago

Tested on Windows, like expected "setting '-l none' because links cannot be created"... But I also get that on OSX, where I definitely can create symlinks.

mtbc commented 5 years ago

That's strange and wrong, thank you for checking. In an admin console on Windows do you also get the warning?

dominikl commented 5 years ago

Yes, running on Windows as admin too.

Edit: Also on Debian:

dominik@devuan:~/Downloads/OMERO.downloader-0.1.5-SNAPSHOT$ ./download.sh -b /home/dominik/tmp/ -u dlindner -s demo.openmicroscopy.org -w ***** -f binary Image:61906
finding target images... done
mapping filesets of images... done
setting '-l none' because links cannot be created
(1/1) determining files used by image 61906... done
(1/1, 1/1) commencing download of file 201802.......... done
mtbc commented 5 years ago

Thank you, let me see if I can figure how I broke it. :smiley:

mtbc commented 5 years ago

Should be fixed now, sorry: that's probably what I get for a last-minute fiddling before pushing.

dominikl commented 5 years ago

Thanks @mtbc . Fixed now 👍

Screen Shot 2019-04-05 at 15 16 09