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
1e33b3dc
Kaydet (Commit)
1e33b3dc
authored
Ock 30, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
osl::{File,Directory}::getURL() had curiously been missing
Change-Id: I0af83e7aeaf681440d4bbb50d8b00390f8464b1a
üst
5443d648
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
app.cxx
desktop/source/app/app.cxx
+13
-10
file.hxx
sal/inc/osl/file.hxx
+18
-0
No files found.
desktop/source/app/app.cxx
Dosyayı görüntüle @
1e33b3dc
...
@@ -156,7 +156,8 @@ void removeTree(OUString const & url) {
...
@@ -156,7 +156,8 @@ void removeTree(OUString const & url) {
case
osl
:
:
FileBase
::
E_NOENT
:
case
osl
:
:
FileBase
::
E_NOENT
:
return
;
//TODO: SAL_WARN if recursive
return
;
//TODO: SAL_WARN if recursive
default
:
default
:
SAL_WARN
(
"desktop"
,
"cannot open directory "
<<
url
<<
": "
<<
+
rc
);
SAL_WARN
(
"desktop"
,
"cannot open directory "
<<
dir
.
getURL
()
<<
": "
<<
+
rc
);
return
;
return
;
}
}
for
(;;)
{
for
(;;)
{
...
@@ -167,7 +168,8 @@ void removeTree(OUString const & url) {
...
@@ -167,7 +168,8 @@ void removeTree(OUString const & url) {
}
}
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
SAL_WARN
(
SAL_WARN
(
"desktop"
,
"cannot iterate directory "
<<
url
<<
": "
<<
+
rc
);
"desktop"
,
"cannot iterate directory "
<<
dir
.
getURL
()
<<
": "
<<
+
rc
);
break
;
break
;
}
}
osl
::
FileStatus
stat
(
osl
::
FileStatus
stat
(
...
@@ -176,7 +178,8 @@ void removeTree(OUString const & url) {
...
@@ -176,7 +178,8 @@ void removeTree(OUString const & url) {
rc
=
i
.
getFileStatus
(
stat
);
rc
=
i
.
getFileStatus
(
stat
);
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
SAL_WARN
(
SAL_WARN
(
"desktop"
,
"cannot stat in directory "
<<
url
<<
": "
<<
+
rc
);
"desktop"
,
"cannot stat in directory "
<<
dir
.
getURL
()
<<
": "
<<
+
rc
);
continue
;
continue
;
}
}
if
(
stat
.
getFileType
()
==
osl
::
FileStatus
::
Directory
)
{
//TODO: symlinks
if
(
stat
.
getFileType
()
==
osl
::
FileStatus
::
Directory
)
{
//TODO: symlinks
...
@@ -192,7 +195,7 @@ void removeTree(OUString const & url) {
...
@@ -192,7 +195,7 @@ void removeTree(OUString const & url) {
rc
=
dir
.
close
();
rc
=
dir
.
close
();
SAL_WARN_IF
(
SAL_WARN_IF
(
rc
!=
osl
::
FileBase
::
E_None
,
"desktop"
,
rc
!=
osl
::
FileBase
::
E_None
,
"desktop"
,
"cannot close directory "
<<
url
<<
": "
<<
+
rc
);
"cannot close directory "
<<
dir
.
getURL
()
<<
": "
<<
+
rc
);
}
}
rc
=
osl
::
Directory
::
remove
(
url
);
rc
=
osl
::
Directory
::
remove
(
url
);
SAL_WARN_IF
(
SAL_WARN_IF
(
...
@@ -249,11 +252,11 @@ bool cleanExtensionCache() {
...
@@ -249,11 +252,11 @@ bool cleanExtensionCache() {
osl
::
FileBase
::
RC
rc2
=
fr
.
close
();
osl
::
FileBase
::
RC
rc2
=
fr
.
close
();
SAL_WARN_IF
(
SAL_WARN_IF
(
rc2
!=
osl
::
FileBase
::
E_None
,
"desktop"
,
rc2
!=
osl
::
FileBase
::
E_None
,
"desktop"
,
"cannot close "
<<
buildIdFile
<<
" after reading: "
<<
+
rc2
);
"cannot close "
<<
fr
.
getURL
()
<<
" after reading: "
<<
+
rc2
);
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
SAL_WARN
(
SAL_WARN
(
"desktop"
,
"desktop"
,
"cannot read from "
<<
buildIdFile
<<
": "
<<
+
rc
);
"cannot read from "
<<
fr
.
getURL
()
<<
": "
<<
+
rc
);
break
;
break
;
}
}
OUString
s2
(
OUString
s2
(
...
@@ -271,7 +274,7 @@ bool cleanExtensionCache() {
...
@@ -271,7 +274,7 @@ bool cleanExtensionCache() {
default
:
default
:
SAL_WARN
(
SAL_WARN
(
"desktop"
,
"desktop"
,
"cannot open "
<<
buildIdFile
<<
" for reading: "
<<
+
rc
);
"cannot open "
<<
fr
.
getURL
()
<<
" for reading: "
<<
+
rc
);
break
;
break
;
}
}
removeTree
(
extDir
);
removeTree
(
extDir
);
...
@@ -292,7 +295,7 @@ bool cleanExtensionCache() {
...
@@ -292,7 +295,7 @@ bool cleanExtensionCache() {
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
if
(
rc
!=
osl
::
FileBase
::
E_None
)
{
SAL_WARN
(
SAL_WARN
(
"desktop"
,
"desktop"
,
"cannot open "
<<
buildIdFile
<<
" for writing: "
<<
+
rc
);
"cannot open "
<<
fw
.
getURL
()
<<
" for writing: "
<<
+
rc
);
return
true
;
return
true
;
}
}
OString
buf
(
OUStringToOString
(
buildId
,
RTL_TEXTENCODING_UTF8
));
OString
buf
(
OUStringToOString
(
buildId
,
RTL_TEXTENCODING_UTF8
));
...
@@ -305,11 +308,11 @@ bool cleanExtensionCache() {
...
@@ -305,11 +308,11 @@ bool cleanExtensionCache() {
(
rc
!=
osl
::
FileBase
::
E_None
(
rc
!=
osl
::
FileBase
::
E_None
||
n
!=
static_cast
<
sal_uInt32
>
(
buf
.
getLength
())),
||
n
!=
static_cast
<
sal_uInt32
>
(
buf
.
getLength
())),
"desktop"
,
"desktop"
,
"cannot write to "
<<
buildIdFile
<<
": "
<<
+
rc
<<
", "
<<
n
);
"cannot write to "
<<
fw
.
getURL
()
<<
": "
<<
+
rc
<<
", "
<<
n
);
rc
=
fw
.
close
();
rc
=
fw
.
close
();
SAL_WARN_IF
(
SAL_WARN_IF
(
rc
!=
osl
::
FileBase
::
E_None
,
"desktop"
,
rc
!=
osl
::
FileBase
::
E_None
,
"desktop"
,
"cannot close "
<<
buildIdFile
<<
" after writing: "
<<
+
rc
);
"cannot close "
<<
fw
.
getURL
()
<<
" after writing: "
<<
+
rc
);
return
true
;
return
true
;
}
}
...
...
sal/inc/osl/file.hxx
Dosyayı görüntüle @
1e33b3dc
...
@@ -935,6 +935,15 @@ public:
...
@@ -935,6 +935,15 @@ public:
close
();
close
();
}
}
/** Obtain the URL.
@return
the URL with which this File instance was created.
@since LibreOffice 4.1
*/
inline
rtl
::
OUString
getURL
()
const
{
return
_aPath
;
}
/** Open a regular file.
/** Open a regular file.
Open a file. Only regular files can be openend.
Open a file. Only regular files can be openend.
...
@@ -1673,6 +1682,15 @@ public:
...
@@ -1673,6 +1682,15 @@ public:
close
();
close
();
}
}
/** Obtain the URL.
@return
the URL with which this Directory instance was created.
@since LibreOffice 4.1
*/
inline
rtl
::
OUString
getURL
()
const
{
return
_aPath
;
}
/** Open a directory for enumerating its contents.
/** Open a directory for enumerating its contents.
@return
@return
...
...
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