Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 154473 Details for
Bug 296471
core.filesystem natives incorrectly determine file type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch_v01
296471_v01.txt (text/plain), 2.16 KB, created by
Pawel Pogorzelski
on 2009-12-15 09:25:49 EST
(
hide
)
Description:
Patch_v01
Filename:
MIME Type:
Creator:
Pawel Pogorzelski
Created:
2009-12-15 09:25:49 EST
Size:
2.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.filesystem >Index: natives/macosx/localfile.c >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.filesystem/natives/macosx/localfile.c,v >retrieving revision 1.6 >diff -u -r1.6 localfile.c >--- natives/macosx/localfile.c 2 Dec 2009 14:17:28 -0000 1.6 >+++ natives/macosx/localfile.c 15 Dec 2009 14:28:49 -0000 >@@ -102,7 +102,7 @@ > (*env)->CallVoidMethod(env, fileInfo, mid, (jlong)info.st_size); > > // folder or file? >- if ((info.st_mode & S_IFDIR) == S_IFDIR) { >+ if (S_ISDIR(info.st_mode)) { > mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V"); > if (mid == 0) return JNI_FALSE; > (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_DIRECTORY, JNI_TRUE); >@@ -191,7 +191,7 @@ > #if defined(EFS_SYMLINK_SUPPORT) > //do an lstat first to see if it is a symbolic link > code = lstat(name, &info); >- if (code == 0 && (info.st_mode & S_IFLNK) == S_IFLNK) { >+ if (code == 0 && (S_ISLNK(info.st_mode))) { > //symbolic link: read link target > char buf[PATH_MAX+1]; > int len; >Index: natives/unix/localfile.c >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.filesystem/natives/unix/localfile.c,v >retrieving revision 1.12 >diff -u -r1.12 localfile.c >--- natives/unix/localfile.c 2 Dec 2009 14:17:29 -0000 1.12 >+++ natives/unix/localfile.c 15 Dec 2009 14:28:49 -0000 >@@ -117,7 +117,7 @@ > (*env)->CallVoidMethod(env, fileInfo, mid, (jlong)info.st_size); > > // folder or file? >- if ((info.st_mode & S_IFDIR) == S_IFDIR) { >+ if (S_ISDIR(info.st_mode)) { > mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V"); > if (mid == 0) return JNI_FALSE; > (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_DIRECTORY, JNI_TRUE); >@@ -181,7 +181,7 @@ > #if defined(EFS_SYMLINK_SUPPORT) > //do an lstat first to see if it is a symbolic link > code = lstat((const char*)name, &info); >- if (code == 0 && (info.st_mode & S_IFLNK) == S_IFLNK) { >+ if (code == 0 && S_ISLNK(info.st_mode)) { > //symbolic link: read link target > char buf[PATH_MAX+1]; > int len;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 296471
: 154473 |
154474
|
154486
|
154487
|
154495
|
154496
|
154499
|
154500