Commit 2e951b7f authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens

Test for symlink before testing for other file types. Spotted by David

2008-01-08  Kevin Cozens  <kcozens@cvs.gnome.org>

	* plug-ins/script-fu/ftx/ftx.c (foreign_filetype): Test for symlink
	before testing for other file types. Spotted by David Martin.

svn path=/trunk/; revision=24568
parent 27319afd
2008-01-08 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/ftx/ftx.c (foreign_filetype): Test for symlink
before testing for other file types. Spotted by David Martin.
2008-01-07 Michael Natterer <mitch@gimp.org>
* app/gegl/gimpoperationlevels.[ch]: add properties, some cleanup.
......
......@@ -90,12 +90,12 @@ pointer foreign_filetype(scheme *sc, pointer args)
filename = sc->vptr->string_value(first_arg);
filename = g_filename_from_utf8 (filename, -1, NULL, NULL, NULL);
if (g_file_test(filename, G_FILE_TEST_IS_REGULAR))
if (g_file_test(filename, G_FILE_TEST_IS_SYMLINK))
retcode = FILE_TYPE_LINK;
else if (g_file_test(filename, G_FILE_TEST_IS_REGULAR))
retcode = FILE_TYPE_FILE;
else if (g_file_test(filename, G_FILE_TEST_IS_DIR))
retcode = FILE_TYPE_DIR;
else if (g_file_test(filename, G_FILE_TEST_IS_SYMLINK))
retcode = FILE_TYPE_LINK;
else
retcode = FILE_TYPE_UNKNOWN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment