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
5b9c3547
Commit
5b9c3547
authored
Aug 28, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wxFileName::CreateTemporaryFile() is switching to /tmp directory when no preceding path is present
parent
a4de3018
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
legacy_plugin.cpp
pcbnew/legacy_plugin.cpp
+11
-5
No files found.
pcbnew/legacy_plugin.cpp
View file @
5b9c3547
...
...
@@ -4091,12 +4091,18 @@ void FPL_CACHE::Save()
_
(
"Legacy library file '%s' is read only"
),
m_lib_name
.
GetData
()
)
);
}
wxString
tempFileName
=
wxFileName
::
CreateTempFileName
(
m_lib_name
);
// wxLogDebug( "tempFileName:'%s'\n", TO_UTF8( tempFileName ) );
wxString
tempFileName
;
// a block {} scope to fire wxFFile wxf()'s destructor
{
// CreateTempFileName works better with an absolute path
wxFileName
abs_lib_name
(
m_lib_name
);
abs_lib_name
.
MakeAbsolute
();
tempFileName
=
wxFileName
::
CreateTempFileName
(
abs_lib_name
.
GetFullPath
()
);
wxLogDebug
(
"tempFileName:'%s' m_lib_name:'%s'
\n
"
,
TO_UTF8
(
tempFileName
),
TO_UTF8
(
m_lib_name
)
);
FILE
*
fp
=
wxFopen
(
tempFileName
,
wxT
(
"w"
)
);
if
(
!
fp
)
{
...
...
@@ -4123,7 +4129,7 @@ void FPL_CACHE::Save()
if
(
wxRename
(
tempFileName
,
m_lib_name
)
)
{
THROW_IO_ERROR
(
wxString
::
Format
(
_
(
"Unable to rename tempfile '%s' to
to
library file '%s'"
),
_
(
"Unable to rename tempfile '%s' to library file '%s'"
),
tempFileName
.
GetData
(),
m_lib_name
.
GetData
()
)
);
}
...
...
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