NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 67 - TiffDecoder should not freely combine path names
TiffDecoder should not freely combine path names
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: ImageJ1
unspecified
PC Windows
: P2 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2009-07-13 23:26 CDT by Duncan Mak
Modified: 2009-09-01 13:06 CDT
0 users

See Also:


Attachments
Proposed fix (827 bytes, patch)
2009-07-13 23:27 CDT, Duncan Mak

Description Duncan Mak 2009-07-13 23:26:11 CDT
Here's a test case written in Clojure:

(import '(java.io File) '(ij.io TiffDecoder))

(let [directory "test"
      filename "image.png"
      file (File. directory filename)
      path (.getPath file)
      decoder (TiffDecoder. (.getParent file) (.getName file))]	
	(try (.getTiffInfo decoder)
	    (catch Exception e
		 (println "Path name should be" path "not" (.getMessage e)))))

This prints: 

Path name should be test/image.png not testimage.png (The system cannot find the file specified)

The fix is available in http://a-chinaman.com/~duncan/patches/0001-Don-t-freely-combine-path-names-and-use-File-instead.patch
Comment 1 Duncan Mak 2009-07-13 23:27:21 CDT
Created attachment 5
Proposed fix
Comment 2 Duncan Mak 2009-07-14 21:40:19 CDT
Wayne wrote to fiji-devel that the fix has been incorporated into ImageJ 1.43d as of July 14th. I think this bug should be closed the next time we sync up ImageJA.

Thanks for the quick response.
Comment 3 Johannes Schindelin 2009-07-14 22:05:58 CDT
Fixed by Wayne in the daily build of ImageJ.
Comment 4 Greg Jefferis 2009-09-01 13:06:08 CDT
As noted, this has been fixed in ImageJ 1.43d.  This was merged into the fiji branch of ImageJA in commit:

d43ae6c3e28be5a6de64f640cde656113d87995f

on 21st July 2009.

Greg.