SF.net SVN: geany:[5226] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Sep 14 11:29:43 UTC 2010
Revision: 5226
http://geany.svn.sourceforge.net/geany/?rev=5226&view=rev
Author: ntrel
Date: 2010-09-14 11:29:42 +0000 (Tue, 14 Sep 2010)
Log Message:
-----------
Ignore directories passed on the command-line (based on patch by
Erik de Castro Lopo, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/main.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-09-13 15:37:46 UTC (rev 5225)
+++ trunk/ChangeLog 2010-09-14 11:29:42 UTC (rev 5226)
@@ -1,3 +1,10 @@
+2010-09-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/main.c:
+ Ignore directories passed on the command-line (based on patch by
+ Erik de Castro Lopo, thanks).
+
+
2010-09-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/interface.c, src/keybindings.c, src/ui_utils.c, geany.glade:
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2010-09-13 15:37:46 UTC (rev 5225)
+++ trunk/src/main.c 2010-09-14 11:29:42 UTC (rev 5226)
@@ -794,6 +794,13 @@
for (i = 1; i < argc; i++)
{
gchar *filename = main_get_argv_filename(argv[i]);
+
+ if (g_file_test(filename, G_FILE_TEST_IS_DIR))
+ {
+ g_free(filename);
+ continue;
+ }
+
#ifdef G_OS_WIN32
/* It seems argv elements are encoded in CP1252 on a German Windows */
setptr(filename, g_locale_to_utf8(filename, -1, NULL, NULL, NULL));
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