You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/05/23 17:28:47 UTC
svn commit: r777943 -
/commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c
Author: mturk
Date: Sat May 23 15:28:46 2009
New Revision: 777943
URL: http://svn.apache.org/viewvc?rev=777943&view=rev
Log:
Fix copy/paste typos from windows code
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c?rev=777943&r1=777942&r2=777943&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c Sat May 23 15:28:46 2009
@@ -271,7 +271,7 @@
return perms;
}
-ACR_DECLARE(int) ACR_FileProtectionGet(JNIEnv *_E, const char *fname)
+ACR_DECLARE(int) ACR_FileProtectionGet(JNIEnv *_E, char *fname)
{
struct_stat info;
@@ -289,10 +289,10 @@
return -1;
}
-ACR_DECLARE(int) ACR_FileProtectionSet(JNIEnv *_E, const char *fname, int prot)
+ACR_DECLARE(int) ACR_FileProtectionSet(JNIEnv *_E, char *fname, int prot)
{
- if (chown(fname, ACR_UnixPermsToMode(prot)) == 0) {
+ if (chmod(fname, ACR_UnixPermsToMode(prot)) == 0) {
return 0;
}
else if (_E) {
@@ -324,9 +324,9 @@
UNREFERENCED_O;
- WITH_WSTR(pathname) {
- rc = ACR_FileProtectionSet(_E, J2W(pathname), prot);
- } END_WITH_WSTR(pathname);
+ WITH_CSTR(pathname) {
+ rc = ACR_FileProtectionSet(_E, J2S(pathname), prot);
+ } END_WITH_CSTR(pathname);
if (rc)
return JNI_FALSE;