SF.net SVN: geany:[3412] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Dec 21 20:09:11 UTC 2008
Revision: 3412
http://geany.svn.sourceforge.net/geany/?rev=3412&view=rev
Author: eht16
Date: 2008-12-21 20:09:08 +0000 (Sun, 21 Dec 2008)
Log Message:
-----------
Only stat() files after saving for the timestamp when file_prefs.disk_check_timeout is set (to greater 0).
Call realpath() on files only when opening or changing the filename but not on every save.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-12-21 19:50:18 UTC (rev 3411)
+++ trunk/ChangeLog 2008-12-21 20:09:08 UTC (rev 3412)
@@ -5,6 +5,11 @@
Command used (on Debian Sid/Experimental):
'CFLAGS=`pkg-config --cflags gtk+-2.0` geany -g gtk-2.14.c.tags
/usr/include/gtk-2.0/gtk/gtk.h'
+ * src/document.c:
+ Only stat() files after saving for the timestamp when
+ file_prefs.disk_check_timeout is set (to greater 0).
+ Call realpath() on files only when opening or changing the filename
+ but not on every save.
2008-12-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2008-12-21 19:50:18 UTC (rev 3411)
+++ trunk/src/document.c 2008-12-21 20:09:08 UTC (rev 3412)
@@ -1342,6 +1342,8 @@
g_free(doc->file_name);
doc->file_name = g_strdup(utf8_fname);
}
+ /* reset real path, it's retrieved again in document_save() */
+ setptr(doc->real_path, NULL);
/* detect filetype */
if (FILETYPE_ID(doc->file_type) == GEANY_FILETYPES_NONE)
@@ -1547,8 +1549,10 @@
}
/* now the file is on disk, set real_path */
- g_free(doc->real_path);
- doc->real_path = get_real_path_from_utf8(doc->file_name);
+ if (doc->real_path == NULL)
+ {
+ doc->real_path = get_real_path_from_utf8(doc->file_name);
+ }
/* store the opened encoding for undo/redo */
store_saved_encoding(doc);
@@ -1560,7 +1564,8 @@
/* stat the file to get the timestamp, otherwise on Windows the actual
* timestamp can be ahead of time(NULL) */
- document_update_timestamp(doc);
+ if (file_prefs.disk_check_timeout > 0)
+ document_update_timestamp(doc);
/* update filetype-related things */
document_set_filetype(doc, doc->file_type);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list