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
45b57a9d
Kaydet (Commit)
45b57a9d
authored
Nis 17, 2012
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
prevent getFileURL() & getLinkTargetURL() asserting for broken links
üst
cf1e3b91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
37 deletions
+40
-37
shell.cxx
ucb/source/ucp/file/shell.cxx
+40
-37
No files found.
ucb/source/ucp/file/shell.cxx
Dosyayı görüntüle @
45b57a9d
...
...
@@ -2491,54 +2491,57 @@ shell::getv(
osl_FileStatus_Mask_FileURL
|
osl_FileStatus_Mask_Type
|
osl_FileStatus_Mask_LinkTargetURL
);
aDirItem
.
getFileStatus
(
aFileStatus
);
aUnqPath
=
aFileStatus
.
getFileURL
();
// If the directory item type is a link retrieve the type of the target
if
(
aFileStatus
.
getFileType
()
==
osl
::
FileStatus
::
Link
)
osl
::
FileBase
::
RC
aRes
=
aDirItem
.
getFileStatus
(
aFileStatus
);
if
(
aRes
==
osl
::
FileBase
::
E_None
)
{
// Assume failure
aIsRegular
=
false
;
osl
::
FileBase
::
RC
result
=
osl
::
FileBase
::
E_INVAL
;
osl
::
DirectoryItem
aTargetItem
;
osl
::
DirectoryItem
::
get
(
aFileStatus
.
getLinkTargetURL
(),
aTargetItem
);
if
(
aTargetItem
.
is
()
)
aUnqPath
=
aFileStatus
.
getFileURL
();
// If the directory item type is a link retrieve the type of the target
if
(
aFileStatus
.
getFileType
()
==
osl
::
FileStatus
::
Link
)
{
osl
::
FileStatus
aTargetStatus
(
osl_FileStatus_Mask_Type
);
// Assume failure
aIsRegular
=
false
;
osl
::
FileBase
::
RC
result
=
osl
::
FileBase
::
E_INVAL
;
osl
::
DirectoryItem
aTargetItem
;
osl
::
DirectoryItem
::
get
(
aFileStatus
.
getLinkTargetURL
(),
aTargetItem
);
if
(
aTargetItem
.
is
()
)
{
osl
::
FileStatus
aTargetStatus
(
osl_FileStatus_Mask_Type
);
if
(
osl
::
FileBase
::
E_None
==
(
result
=
aTargetItem
.
getFileStatus
(
aTargetStatus
)
)
)
aIsRegular
=
aTargetStatus
.
getFileType
()
==
osl
::
FileStatus
::
Regular
;
if
(
osl
::
FileBase
::
E_None
==
(
result
=
aTargetItem
.
getFileStatus
(
aTargetStatus
)
)
)
aIsRegular
=
aTargetStatus
.
getFileType
()
==
osl
::
FileStatus
::
Regular
;
}
}
}
else
aIsRegular
=
aFileStatus
.
getFileType
()
==
osl
::
FileStatus
::
Regular
;
else
aIsRegular
=
aFileStatus
.
getFileType
()
==
osl
::
FileStatus
::
Regular
;
registerNotifier
(
aUnqPath
,
pNotifier
);
insertDefaultProperties
(
aUnqPath
);
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
registerNotifier
(
aUnqPath
,
pNotifier
);
insertDefaultProperties
(
aUnqPath
);
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
shell
::
ContentMap
::
iterator
it
=
m_aContent
.
find
(
aUnqPath
);
commit
(
it
,
aFileStatus
);
shell
::
ContentMap
::
iterator
it
=
m_aContent
.
find
(
aUnqPath
);
commit
(
it
,
aFileStatus
);
shell
::
PropertySet
::
iterator
it1
;
PropertySet
&
propset
=
*
(
it
->
second
.
properties
);
shell
::
PropertySet
::
iterator
it1
;
PropertySet
&
propset
=
*
(
it
->
second
.
properties
);
for
(
sal_Int32
i
=
0
;
i
<
seq
.
getLength
();
++
i
)
{
MyProperty
readProp
(
properties
[
i
].
Name
);
it1
=
propset
.
find
(
readProp
);
if
(
it1
==
propset
.
end
()
)
seq
[
i
]
=
uno
::
Any
();
else
seq
[
i
]
=
it1
->
getValue
();
for
(
sal_Int32
i
=
0
;
i
<
seq
.
getLength
();
++
i
)
{
MyProperty
readProp
(
properties
[
i
].
Name
);
it1
=
propset
.
find
(
readProp
);
if
(
it1
==
propset
.
end
()
)
seq
[
i
]
=
uno
::
Any
();
else
seq
[
i
]
=
it1
->
getValue
();
}
}
deregisterNotifier
(
aUnqPath
,
pNotifier
);
}
deregisterNotifier
(
aUnqPath
,
pNotifier
);
XRow_impl
*
p
=
new
XRow_impl
(
this
,
seq
);
return
uno
::
Reference
<
sdbc
::
XRow
>
(
p
);
}
...
...
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