Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
61fa967b
Kaydet (Commit)
61fa967b
authored
Şub 24, 2011
tarafından
Joachim Lingner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
jl164 #i109096# java help indexer service did not work with long file paths
üst
890599fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
long_path.patch
lucene/long_path.patch
+37
-0
makefile.mk
lucene/makefile.mk
+6
-1
No files found.
lucene/long_path.patch
0 → 100644
Dosyayı görüntüle @
61fa967b
--- misc/lucene-2.3.2/src/java/org/apache/lucene/store/FSDirectory.java 2008-05-01 22:27:58.000000000 +0200
+++ misc/build/lucene-2.3.2/src/java/org/apache/lucene/store/FSDirectory.java 2011-02-23 16:36:26.249515000 +0100
@@ -165,7 +165,15 @@
public static FSDirectory getDirectory(File file, LockFactory lockFactory)
throws IOException
{
- file = new File(file.getCanonicalPath());
+ String path = file.getPath();
+ //File.getCanonicalPath fails on Windows with long path names
+ //Tested with Java SE 6u23
+ //Long path names created by osl_getSystemPathFromFileURL are already
+ //unique because its implementation replaces the occurrences of .. and .
+ //That is using the com.sun.star.help.HelpIndexer service from c++ is
+ //relatively safe.
+ if (!path.startsWith("\\\\?\\"))
+ file = new File(file.getCanonicalPath());
if (file.exists() && !file.isDirectory())
throw new IOException(file + " not a directory");
@@ -455,7 +463,16 @@
public String getLockID() {
String dirName; // name to be hashed
try {
- dirName = directory.getCanonicalPath();
+ //File.getCanonicalPath fails on Windows with long path names
+ //Tested with Java SE 6u23
+ //Long path names created by osl_getSystemPathFromFileURL are already
+ //unique because its implementation replaces the occurrences of .. and .
+ //That is using the com.sun.star.help.HelpIndexer service from c++ is
+ //relatively safe.
+ if (!directory.getPath().startsWith("\\\\?\\"))
+ dirName = directory.getCanonicalPath();
+ else
+ dirName = directory.getPath();
} catch (IOException e) {
throw new RuntimeException(e.toString(), e);
}
lucene/makefile.mk
Dosyayı görüntüle @
61fa967b
...
...
@@ -50,7 +50,12 @@ LUCENE_ANALYZERS_JAR=lucene-analyzers-$(LUCENE_MAJOR).$(LUCENE_MINOR).jar
TARFILE_NAME
=
$(LUCENE_NAME)
TARFILE_MD5
=
48d8169acc35f97e05d8dcdfd45be7f2
PATCH_FILES
=
lucene.patch
PATCH_FILES
=
lucene.patch
.IF
"$(OS)"
==
"WNT"
PATCH_FILES
+=
long_path.patch
.ENDIF
BUILD_DIR
=
.
BUILD_ACTION
=
${
ANT
}
-buildfile
.
$/
contrib
$/
analyzers
$/
build.xml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment