Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Data Exporter
Commits
040dcdec
Commit
040dcdec
authored
Aug 12, 2019
by
Laurent Montel
😁
Browse files
Add messagebox when we don't want to override file
parent
11c68357
Changes
1
Hide whitespace changes
Inline
Side-by-side
gui/dialog/showarchivestructuredialog.cpp
View file @
040dcdec
...
@@ -99,7 +99,13 @@ void ShowArchiveStructureDialog::slotExtractFile()
...
@@ -99,7 +99,13 @@ void ShowArchiveStructureDialog::slotExtractFile()
QFileDialog
::
ShowDirsOnly
QFileDialog
::
ShowDirsOnly
|
QFileDialog
::
DontResolveSymlinks
);
|
QFileDialog
::
DontResolveSymlinks
);
if
(
!
dir
.
isEmpty
())
{
if
(
!
dir
.
isEmpty
())
{
if
(
QFile
(
dir
+
QLatin1Char
(
'/'
)
+
currentFile
->
name
()).
exists
())
{
if
(
KMessageBox
::
questionYesNo
(
this
,
i18n
(
"Do you want to override %1"
,
currentFile
->
name
()),
i18n
(
"File Already Exist"
)
)
==
KMessageBox
::
No
)
{
return
;
}
}
if
(
!
currentFile
->
copyTo
(
dir
))
{
if
(
!
currentFile
->
copyTo
(
dir
))
{
KMessageBox
::
error
(
this
,
i18n
(
"Impossible to copy %1 in %2."
,
currentFile
->
name
()),
dir
);
qCWarning
(
PIMDATAEXPORTERGUI_LOG
)
<<
"Impossible to extract file: "
<<
currentItem
->
text
(
0
)
<<
" to "
<<
dir
;
qCWarning
(
PIMDATAEXPORTERGUI_LOG
)
<<
"Impossible to extract file: "
<<
currentItem
->
text
(
0
)
<<
" to "
<<
dir
;
}
}
}
}
...
...
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