summaryrefslogtreecommitdiffstats
path: root/poi-examples
diff options
context:
space:
mode:
authorTim Allison <tallison@apache.org>2023-09-20 20:32:59 +0000
committerTim Allison <tallison@apache.org>2023-09-20 20:32:59 +0000
commit99117381e59d9a7f2abe27784009358c672c0ae3 (patch)
tree190b7ef61d91f9579bd7605d1a2c45cf142ea674 /poi-examples
parentce919673c4e935e8c756c91938f973d5c9a23ddb (diff)
downloadpoi-99117381e59d9a7f2abe27784009358c672c0ae3.tar.gz
poi-99117381e59d9a7f2abe27784009358c672c0ae3.zip
Bug47950 -- make stream/directory name lookup in OLE2 case insensitive
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912438 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
-rw-r--r--poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java4
-rw-r--r--poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java
index 010504140c..fef6ae5aef 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java
@@ -174,8 +174,8 @@ public final class CopyCompare {
for (int i=0; i<path.length(); i++) {
String subDir = path.getComponent(i);
- if (de.hasEntry(subDir)) {
- de = (DirectoryEntry)de.getEntry(subDir);
+ if (de.hasEntryCaseInsensitive(subDir)) {
+ de = (DirectoryEntry)de.getEntryCaseInsensitive(subDir);
} else {
de = de.createDirectory(subDir);
if (i == path.length()-1) {
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java
index 71f4d8aa93..c731b0ac89 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java
@@ -158,7 +158,7 @@ public final class WriteAuthorAndTitle {
for (int i=0; i<path.length(); i++) {
String subDir = path.getComponent(i);
- de = (de.hasEntry(subDir)) ? (DirectoryEntry)de.getEntry(subDir) : de.createDirectory(subDir);
+ de = (de.hasEntryCaseInsensitive(subDir)) ? (DirectoryEntry)de.getEntryCaseInsensitive(subDir) : de.createDirectory(subDir);
}
de.createDocument(event.getName(), is);