Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added the output file open check unit test and code.
[xestiaab/.git]
/
source
/
convert.cpp
diff --git
a/source/convert.cpp
b/source/convert.cpp
index
69926de
..
2da7e45
100644
(file)
--- a/
source/convert.cpp
+++ b/
source/convert.cpp
@@
-90,6
+90,18
@@
ConvertResult ConvertContact(wxString InputFormat, wxString OutputFormat,
}
}
+ // Check that the output file can be opened.
+
+ wxFile OutputFile;
+
+ if (!OutputFilename.IsEmpty()){
+
+ if (!OutputFile.Open(OutputFilename, wxFile::write, wxS_DEFAULT)){
+ return CONVERTRESULT_OUTPUTFILEERROR;
+ }
+
+ }
+
return CONVERTRESULT_OK;
}
\ No newline at end of file
return CONVERTRESULT_OK;
}
\ No newline at end of file
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy