Skip to content

Commit

Permalink
i.fusion.hpf: fix Illegal filename <.hpf> warning (#713)
Browse files Browse the repository at this point in the history
Fixes, when `suffix` is not used: `WARNING: Illegal filename <.hpf>. Cannot start with '.' or be 'NULL'.`

(In the parser `answer` no trailing dot may be used).
  • Loading branch information
neteler committed Mar 17, 2022
1 parent 140fd6e commit 99003aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/imagery/i.fusion.hpf/i.fusion.hpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
# % label: Suffix for output image(s)
# % description: Names of Pan-Sharpened image(s) will end with this suffix
# % required: yes
# % answer: .hpf
# % answer: hpf
# %end

# %option
Expand Down Expand Up @@ -724,7 +724,7 @@ def main():
run("r.support", map=tmp_msx_hpf, history="\n".join(cmd_history))

# add suffix to basename & rename end product
msx_name = "{base}{suffix}"
msx_name = "{base}.{suffix}"
msx_name = msx_name.format(base=msx.split("@")[0], suffix=outputsuffix)
run("g.rename", raster=(tmp_msx_hpf, msx_name))

Expand Down

0 comments on commit 99003aa

Please sign in to comment.