CenterForDigitalHumanities / SpectralRTI_Toolkit

Process Spectral RTI Images in ImageJ
GNU General Public License v3.0
1 stars 0 forks source link

Paths with a space in the name cause crash #59

Open thehabes opened 6 years ago

thehabes commented 6 years ago

Paths (like locate the fitter or project directory) that have a space in them cause a crash. Need to put quotes around these when building the command line argument string to avoid this.

thanneken commented 6 years ago

I think the HSH fitter will not handle paths with spaces, so quoting the string would just kick the can down the road for another error later. I think more useful for now would be a warning if the project path contains spaces. I think it would be fine if the hshfitter path itself has spaces, appropriately quoted.

thehabes commented 6 years ago

This is where the problem lives. When passing file paths off to the software, the software will not accept filesnames with spaces. It breaks the fitter and jp2 compressor, even when the commands are propery quotation enclosed. There is no way around it, do not name your files or directories with spaces because there is no promise the third party software will accept it.

thanneken commented 5 years ago

Would it be simple to warn the user early on that the project file path contains a space? This came up several times, and the error message was completely cryptic.

thehabes commented 4 years ago

Added in checks for file/directory paths that contain a space in places that set the project directory, web RTI maker paths, JP2 compressor and Fitter. When a space is detected, a pop up warns the user that the paths should not contains a space and triggers the while loop to show the file/directory chooser again

thehabes commented 4 years ago

Please test by providing a file where one of the directories in its path has a space.