Login  Register

bug report: -batch command adds txt extension and macros directory automatically

Posted by Carnë Draug on Mar 14, 2014; 1:28pm
URL: http://imagej.273.s1.nabble.com/bug-report-batch-command-adds-txt-extension-and-macros-directory-automatically-tp5006916.html

Hi

The title says it all. It would appear that ImageJ automatically adds
a txt extension when there is none, even if the file without file
extension exists. How to reproduce

1) create a simple macro

$ echo 'print ("Hello world!");' > ./macro_test

2) get an error from ImageJ about file not existing

$ ImageJ-linux32 -batch macro_test

Macro or script not found:

$path for imagej$macros/macro_test.txt

Note that this works fine if the file exists in the current directory
with a txt file extension. A temporary workaround for this is to use
"-batch ./macro_test" but I don't think that ImageJ should be trying
to make any guess at all. Anyone calling through the command line
should know how to specify the path for the macro file. And even if it
should be guessing, then it should only do it after checking if the
file does exist in the current directory.

I am using ImageJ via FIJI in Debian Squeeze (current stable version)
  IJ.getVersion: 1.48s
  IJ.getFullVersion: 1.48s99

Carnë

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html