mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
fix temp dir
This commit is contained in:
parent
8792527ef6
commit
2e3efcc964
@ -123,13 +123,17 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
//prepare the directories
|
//prepare the directories
|
||||||
param.tmp_dir = tmpnam(nullptr);
|
param.tmp_dir = tmpnam(nullptr);
|
||||||
|
if(param.debug)
|
||||||
|
cerr << "temporary dir: " << (param.tmp_dir) << endl;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
create_directories(param.dest_dir);
|
create_directories(param.dest_dir);
|
||||||
create_directories(param.tmp_dir);
|
create_directories(param.tmp_dir);
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (const string & s)
|
||||||
{
|
{
|
||||||
|
cerr << s << endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +132,8 @@ const char * base64stream::base64_encoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh
|
|||||||
|
|
||||||
void create_directories(string path)
|
void create_directories(string path)
|
||||||
{
|
{
|
||||||
|
if(path.empty()) return;
|
||||||
|
|
||||||
size_t idx = path.rfind('/');
|
size_t idx = path.rfind('/');
|
||||||
if(idx != string::npos)
|
if(idx != string::npos)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user