Bug 348088 - Name of local image directory doesn't check for multiple '.' in file name
Summary: Name of local image directory doesn't check for multiple '.' in file name
Status: RESOLVED FIXED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: 2.3.10
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Robby Stephenson
URL: https://mail.kde.org/pipermail/tellic...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 00:56 UTC by Robby Stephenson
Modified: 2016-11-07 00:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robby Stephenson 2015-05-22 00:56:55 UTC
The name of the local image directory uses .section('.', 0, 0) so for filenames like "Collection.tc" and "Collection.FooBar.tc", the directory name will be the same, "Collection_files".

Need to update ImageFactory::setLocalDirectory() and HTMLExporter::fileDirName(), but keep in mind backwards compatability should be retained. That is, a user shouldn't lose images if they had multiple periods in the filename when this bug is fixed.

Reproducible: Always
Comment 1 Robby Stephenson 2015-05-23 03:27:23 UTC
Git commit d840d5884c0add5e7aa0d7427059eca8858eda81 by Robby Stephenson.
Committed on 23/05/2015 at 03:25.
Pushed by rstephenson into branch 'master'.

Correct the name of the image directory when file has multiple periods

The local image directory was using .section('.', 0, 0) and should
be using completeBaseName() so file names with multiple periods would
use the expected directory name

Unit test added to verify that backwards compatability is not broken.
But users with this behavior would not be able to go back to an older
version and have the images work correctly.

M  +1    -1    src/document.cpp
M  +1    -1    src/images/imagedirectory.cpp
M  +33   -1    src/images/imagefactory.cpp
M  +3    -0    src/tests/CMakeLists.txt
A  +-    --    src/tests/data/with-image.tc
A  +130  -0    src/tests/documenttest.cpp     [License: GPL (v2/3)]
A  +38   -0    src/tests/documenttest.h     [License: GPL (v2/3)]
M  +3    -1    src/translators/htmlexporter.cpp

http://commits.kde.org/tellico/d840d5884c0add5e7aa0d7427059eca8858eda81
Comment 2 Robby Stephenson 2015-05-26 01:56:20 UTC
Git commit da2a81cd87edf6b44c8ad8d9015b693d9bcdcc06 by Robby Stephenson.
Committed on 26/05/2015 at 01:35.
Pushed by rstephenson into branch 'frameworks'.

Correct the name of the image directory when file has multiple periods

The local image directory was using .section('.', 0, 0) and should
be using completeBaseName() so file names with multiple periods would
use the expected directory name

Unit test added to verify that backwards compatability is not broken.
But users with this behavior would not be able to go back to an older
version and have the images work correctly.

Conflicts:
	src/images/imagefactory.cpp
	src/tests/CMakeLists.txt

M  +2    -3    src/document.cpp
M  +1    -1    src/images/imagedirectory.cpp
M  +39   -7    src/images/imagefactory.cpp
M  +11   -0    src/tests/CMakeLists.txt
A  +-    --    src/tests/data/with-image.tc
A  +129  -0    src/tests/documenttest.cpp     [License: GPL (v2/3)]
A  +38   -0    src/tests/documenttest.h     [License: GPL (v2/3)]
M  +3    -1    src/translators/htmlexporter.cpp

http://commits.kde.org/tellico/da2a81cd87edf6b44c8ad8d9015b693d9bcdcc06
Comment 3 Robby Stephenson 2016-11-07 00:41:32 UTC
Git commit fe0f594a9102ffcce5af8fe2f924bbb6c98dbeee by Robby Stephenson.
Committed on 07/11/2016 at 00:41.
Pushed by rstephenson into branch '2.3'.

Correct the name of the image directory when file has multiple periods

The local image directory was using .section('.', 0, 0) and should
be using completeBaseName() so file names with multiple periods would
use the expected directory name

Unit test added to verify that backwards compatability is not broken.
But users with this behavior would not be able to go back to an older
version and have the images work correctly.

Conflicts:
	src/images/imagefactory.cpp

M  +1    -1    src/document.cpp
M  +1    -1    src/images/imagedirectory.cpp
M  +31   -1    src/images/imagefactory.cpp
M  +3    -0    src/tests/CMakeLists.txt
A  +-    --    src/tests/data/with-image.tc
A  +139  -0    src/tests/documenttest.cpp     [License: GPL (v2/3)]
A  +38   -0    src/tests/documenttest.h     [License: GPL (v2/3)]
M  +3    -1    src/translators/htmlexporter.cpp

http://commits.kde.org/tellico/fe0f594a9102ffcce5af8fe2f924bbb6c98dbeee