Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
f1cd744c
Commit
f1cd744c
authored
Feb 26, 2021
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transcode job: don't silently overwrite exported files.
BUG: 433623
parent
32c27894
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/jobs/transcodeclipjob.cpp
src/jobs/transcodeclipjob.cpp
+5
-6
No files found.
src/jobs/transcodeclipjob.cpp
View file @
f1cd744c
...
...
@@ -63,19 +63,18 @@ bool TranscodeJob::startJob()
QFileInfo
finfo
(
source
);
QString
fileName
=
finfo
.
fileName
().
section
(
QLatin1Char
(
'.'
),
0
,
-
2
);
QDir
dir
=
finfo
.
absoluteDir
();
QString
path
=
fileName
+
transcoderExt
;
int
fileCount
=
1
;
QString
num
=
QString
::
number
(
fileCount
).
rightJustified
(
4
,
'0'
,
false
);
QString
path
=
fileName
+
num
+
transcoderExt
;
bool
updatedPath
=
false
;
while
(
dir
.
exists
(
path
))
{
QString
num
=
QString
::
number
(
fileCount
).
rightJustified
(
4
,
'0'
,
false
);
path
=
fileName
+
num
+
transcoderExt
;
++
fileCount
;
num
=
QString
::
number
(
fileCount
).
rightJustified
(
4
,
'0'
,
false
);
path
=
fileName
+
num
+
transcoderExt
;
updatedPath
=
true
;
}
m_destUrl
=
dir
.
absoluteFilePath
(
fileName
);
if
(
updatedPath
)
{
m_destUrl
.
append
(
QString
::
number
(
fileCount
).
rightJustified
(
4
,
'0'
,
false
));
}
m_destUrl
.
append
(
QString
::
number
(
fileCount
).
rightJustified
(
4
,
'0'
,
false
));
bool
result
;
if
(
type
==
ClipType
::
Playlist
||
type
==
ClipType
::
SlideShow
)
{
...
...
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