Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
b9c56b2f
Commit
b9c56b2f
authored
Dec 24, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: avoid use of wxFileName::GetModificationTime() when it can fail.
parent
fdd9b798
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
utf8.h
include/utf8.h
+1
-1
eagle_plugin.cpp
pcbnew/eagle_plugin.cpp
+12
-5
No files found.
include/utf8.h
View file @
b9c56b2f
...
...
@@ -65,7 +65,7 @@ public:
/// For use with _() function on wx 2.8:
UTF8
(
const
wchar_t
*
txt
);
explicit
UTF8
(
const
std
::
string
&
o
)
:
UTF8
(
const
std
::
string
&
o
)
:
std
::
string
(
o
)
{
}
...
...
pcbnew/eagle_plugin.cpp
View file @
b9c56b2f
...
...
@@ -93,9 +93,6 @@ typedef boost::optional<double> opt_double;
typedef
boost
::
optional
<
bool
>
opt_bool
;
const
wxChar
*
traceEaglePlugin
=
wxT
(
"KicadEaglePlugin"
);
/// segment (element) of our XPATH into the Eagle XML document tree in PTREE form.
struct
TRIPLET
{
...
...
@@ -2741,6 +2738,18 @@ wxDateTime EAGLE_PLUGIN::getModificationTime( const wxString& aPath )
{
wxFileName
fn
(
aPath
);
// Do not call wxFileName::GetModificationTime() on a non-existent file, because
// if it fails, wx's implementation calls the crap wxLogSysError() which
// eventually infects our UI with an unwanted popup window, so don't let it fail.
if
(
!
fn
.
IsFileReadable
()
)
{
wxString
msg
=
wxString
::
Format
(
_
(
"File '%s' is not readable."
),
GetChars
(
aPath
)
);
THROW_IO_ERROR
(
msg
);
}
/*
// update the writable flag while we have a wxFileName, in a network this
// is possibly quite dynamic anyway.
...
...
@@ -2770,8 +2779,6 @@ void EAGLE_PLUGIN::cacheLib( const wxString& aLibPath )
if
(
aLibPath
!=
m_lib_path
||
load
)
{
wxLogTrace
(
traceEaglePlugin
,
wxT
(
"Loading '%s'"
),
TO_UTF8
(
aLibPath
)
);
PTREE
doc
;
LOCALE_IO
toggle
;
// toggles on, then off, the C locale.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment