To see the problem, consider the following code fragment:
File deadly = new File( "/Users/Shared/\";rm -fr $HOME\"" );
deadly.mkdirs();
YourExample.chmod( deadly, "g+w", false );
This obviously only is a concern because it's the shell and not chmod
being exec'd. What is still unclear to me is whether that is
necessary for the Runtime exec with the Japanese characters to work
correctly. I have OS X specific code where I Runtime chmod. If this
represents a way to rather simply localize the code better I would be
interested in knowing how I might use it. So not entirely academic
interest or only for the record in the archives. Well I know of no
one in Japan who would be waiting for me to fix this, so somewhat
academic. But, will UTF-8 encoding the filename passed to chmod be
sufficient for it to work? Or do you in fact have to UTF-8 encode the
entire command and pass that to a Runtime exec of the shell?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden