[gnumeric] On export, just change the extension, not more. [ubuntu #1497344]



commit 5a2abe574c2da641357b1ffc7166e4517935e76e
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Sep 19 14:01:40 2015 +0200

    On export, just change the extension, not more. [ubuntu #1497344]

 ChangeLog      |    5 +++++
 NEWS           |    1 +
 src/gui-file.c |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 116614f..8e69b22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-19  Jean Brefort  <jean brefort normalesup org>
+
+       * src/gui-file.c (gui_file_save_as): just change the extension not more
+       when the original filename has several dots. [ubuntu #1497344]
+
 2015-09-11  Jean Brefort  <jean brefort normalesup org>
 
        * src/sheet-object.c (cb_so_snap_to_grid): fixed for one cell and absolute
diff --git a/NEWS b/NEWS
index 311452c..88ed6f9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Gnumeric 1.12.24
 Jean:
        * Fix printing of sheet objects with one cell or absolute anchors. [#753961]
        * Fix snap to grid for one cell or basolute anchored objects. [#754792]
+       * On export, just change the extension, not more. [ubuntu #1497344]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.23
diff --git a/src/gui-file.c b/src/gui-file.c
index 858c46c..78b7bc8 100644
--- a/src/gui-file.c
+++ b/src/gui-file.c
@@ -652,7 +652,7 @@ gui_file_save_as (WBCGtk *wbcg, WorkbookView *wb_view, GnmFileSaveAsStyle type,
                if (!ext) ext = "txt";
 
                basename = go_basename_from_uri (wb_uri);
-               dot = strchr (basename, '.');
+               dot = strrchr (basename, '.');
                if (dot) *dot = 0;
                newname = g_strconcat (basename, ".", ext, NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]