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
bf549f17
Kaydet (Commit)
bf549f17
authored
Ock 21, 2003
tarafından
neilm
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed News directory inside parent News directory bug
üst
3dda2aa2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
8 deletions
+38
-8
SubscribedNewsgroups.java
scripting/examples/java/Newsgroup/SubscribedNewsgroups.java
+38
-8
No files found.
scripting/examples/java/Newsgroup/SubscribedNewsgroups.java
Dosyayı görüntüle @
bf549f17
...
...
@@ -172,7 +172,7 @@ public class SubscribedNewsgroups {
else
{
// Unix/Linux format "newsrc-staroffice-news.germany.sun.com"
int
hostNameStart
=
filename
.
indexOf
(
"-"
)
+
1
;
int
hostNameStart
=
filename
.
lastIndexOf
(
"newsrc-"
)
+
7
;
hostname
=
filename
.
substring
(
hostNameStart
,
filename
.
length
()
);
}
...
...
@@ -219,13 +219,16 @@ public class SubscribedNewsgroups {
//System.out.println( "Finding mailrc for: " + newsDirs[i] );
if
(
newsDirs
[
i
]
!=
null
)
{
File
mailrcFiles
[]
=
newsDirs
[
i
].
listFiles
(
new
VersionFilter
()
);
//System.out.println( "Number found: " + mailrcFiles.length );
for
(
int
j
=
0
;
j
<
mailrcFiles
.
length
;
j
++
)
{
//System.out.println( "This mailrc was found: " + mailrcFiles[j] );
allFiles
.
addElement
(
mailrcFiles
[
j
]
);
}
File
mailrcFiles
[]
=
newsDirs
[
i
].
listFiles
(
new
VersionFilter
()
);
if
(
mailrcFiles
!=
null
)
{
//System.out.println( "Number found: " + mailrcFiles.length );
for
(
int
j
=
0
;
j
<
mailrcFiles
.
length
;
j
++
)
{
//System.out.println( "This mailrc was found: " + mailrcFiles[j] );
allFiles
.
addElement
(
mailrcFiles
[
j
]
);
}
}
}
}
File
allMailrcFiles
[]
=
new
File
[
allFiles
.
size
()
];
...
...
@@ -298,7 +301,34 @@ public class SubscribedNewsgroups {
}
else
{
// end recursion
// Check for a News directory inside the News directory (fix for bug)
// Original solution had only "mailrcFile = files[0];"
boolean
noChildNews
=
true
;
File
checkChildNewsDirs
[]
=
files
[
0
].
listFiles
(
new
VersionFilter
());
if
(
checkChildNewsDirs
!=
null
)
{
for
(
int
i
=
0
;
i
<
checkChildNewsDirs
.
length
;
i
++
)
{
if
(
checkChildNewsDirs
[
i
].
getName
().
equals
(
"News"
)
)
{
noChildNews
=
false
;
break
;
}
}
}
if
(
noChildNews
)
{
mailrcFile
=
files
[
0
];
}
else
{
String
childNewsPathName
=
files
[
0
].
getAbsolutePath
()
+
System
.
getProperty
(
"file.separator"
)
+
"News"
;
mailrcFile
=
new
File
(
childNewsPathName
);
}
}
// return a File representing the News dir in a profile
...
...
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