Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chmod




On Dec 31, 2007, at 2:00 PM, Greg Guerin wrote:

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?

Mike Hall        hallmike at att dot net
http://www.geocities.com/mik3hall
http://sourceforge.net/projects/macnative



_______________________________________________
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

This email sent to email@hidden
References: 
 >Re: chmod (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.