From a821944e57da380fa74f81156f247bf75708b5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=BCnter?= Date: Mon, 18 Feb 2019 16:08:09 +0100 Subject: [PATCH] Fix filename constr.: Add ext. only if not initial With this commit we fix the filename construction so that for objects without file extension the correct filename is constructed. Before this commit is applied these objects create file names with an additional dot at the end. --- src/objects/zcl_abapgit_objects_files.clas.abap | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/objects/zcl_abapgit_objects_files.clas.abap b/src/objects/zcl_abapgit_objects_files.clas.abap index 499711636..b945fc64a 100644 --- a/src/objects/zcl_abapgit_objects_files.clas.abap +++ b/src/objects/zcl_abapgit_objects_files.clas.abap @@ -204,13 +204,18 @@ CLASS ZCL_ABAPGIT_OBJECTS_FILES IMPLEMENTATION. ENDIF. IF iv_extra IS INITIAL. - CONCATENATE lv_obj_name '.' ms_item-obj_type '.' iv_ext + CONCATENATE lv_obj_name '.' ms_item-obj_type INTO rv_filename. "#EC NOTEXT ELSE. - CONCATENATE lv_obj_name '.' ms_item-obj_type '.' iv_extra '.' iv_ext + CONCATENATE lv_obj_name '.' ms_item-obj_type '.' iv_extra INTO rv_filename. "#EC NOTEXT ENDIF. + IF iv_ext IS NOT INITIAL. + CONCATENATE rv_filename '.' iv_ext + INTO rv_filename. + ENDIF. + * handle namespaces REPLACE ALL OCCURRENCES OF '/' IN rv_filename WITH '#'. TRANSLATE rv_filename TO LOWER CASE.