summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/filedialog.cpp
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2007-03-21 23:54:26 +0000
committerishmal <ishmal@users.sourceforge.net>2007-03-21 23:54:26 +0000
commitff95d89140cef18a74a151bedd91ab52747c0783 (patch)
treed3aebad3fb5be7e4c9f6b4bb83194d0d05843a63 /src/ui/dialog/filedialog.cpp
parentAdded tootips for toolbar spinbuttons (diff)
downloadinkscape-ff95d89140cef18a74a151bedd91ab52747c0783.tar.gz
inkscape-ff95d89140cef18a74a151bedd91ab52747c0783.zip
Make sure there is a decl for "errno"
(bzr r2731)
Diffstat (limited to 'src/ui/dialog/filedialog.cpp')
-rw-r--r--src/ui/dialog/filedialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp
index c72d8cb29..25390d56f 100644
--- a/src/ui/dialog/filedialog.cpp
+++ b/src/ui/dialog/filedialog.cpp
@@ -59,7 +59,7 @@ void dump_str( const gchar* str, const gchar* prefix );
void dump_ustr( const Glib::ustring& ustr );
#endif
-
+extern int errno;
namespace Inkscape
@@ -630,7 +630,6 @@ bool SVGPreview::set(Glib::ustring &fileName, int dialogType)
g_message("fname:%s", fileName.c_str());
if (Glib::file_test(fileName, Glib::FILE_TEST_IS_DIR)) {
- g_message("dir");
showNoPreview();
return false;
}
@@ -640,9 +639,10 @@ bool SVGPreview::set(Glib::ustring &fileName, int dialogType)
Glib::ustring fileNameUtf8 = Glib::filename_to_utf8(fileName);
gchar *fName = (gchar *)fileNameUtf8.c_str();
struct stat info;
- if (stat(fName, &info))
+ if (g_stat(fName, &info))
{
- g_message("SVGPreview::set() : %s", strerror(errno));
+ g_warning("SVGPreview::set() : %s : %s",
+ fName, strerror(errno));
return FALSE;
}
long fileLen = info.st_size;
@@ -653,7 +653,7 @@ bool SVGPreview::set(Glib::ustring &fileName, int dialogType)
return FALSE;
}
}
-
+
Glib::ustring svg = ".svg";
Glib::ustring svgz = ".svgz";