aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output/paths_source.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-05-29 18:11:26 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:15 -0400
commit4bc9e4921afac5ddf9e84c2f1873639179be86ef (patch)
treec68bf4535c6e6b8264c85c3b7a7b6f2fffb0d320 /src/sdp/output/paths_source.d
parentimage paths (diff)
0.26.2 image(s) without dimensions
Diffstat (limited to 'src/sdp/output/paths_source.d')
-rw-r--r--src/sdp/output/paths_source.d22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/sdp/output/paths_source.d b/src/sdp/output/paths_source.d
index 8f14b8e..e7233f0 100644
--- a/src/sdp/output/paths_source.d
+++ b/src/sdp/output/paths_source.d
@@ -295,18 +295,22 @@ template PathMatters() {
return _dir;
}
auto image_dir_path() {
- string _img_pth(string _possible_img_pth) {
- return asNormalizedPath(file_with_absolute_path.dirName ~ "/" ~ _possible_img_pth).array;
- }
string _paths;
string[] _possible_img_pths = [ "./image", "../image", "../../image" ];
string _img_pth_found = "";
- foreach(_possible_img_pth; _possible_img_pths) {
- if (exists(_img_pth(_possible_img_pth))) {
- _img_pth_found = _img_pth(_possible_img_pth);
- break;
- } else {
- _paths ~= " " ~ _img_pth(_possible_img_pth);
+ if (is_pod) {
+ _img_pth_found = asNormalizedPath(file_with_absolute_path.dirName ~ "/../../image").array;
+ } else {
+ string _img_pth(string _possible_img_pth) {
+ return asNormalizedPath(file_with_absolute_path.dirName ~ "/" ~ _possible_img_pth).array;
+ }
+ foreach(_possible_img_pth; _possible_img_pths) {
+ if (exists(_img_pth(_possible_img_pth))) {
+ _img_pth_found = _img_pth(_possible_img_pth);
+ break;
+ } else {
+ _paths ~= " " ~ _img_pth(_possible_img_pth);
+ }
}
}
if (_img_pth_found.empty) {