1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-05 01:28:39 +00:00

fix temp dir

This commit is contained in:
Lu Wang 2012-09-10 01:23:28 +08:00
parent 8792527ef6
commit 2e3efcc964
2 changed files with 7 additions and 1 deletions

View File

@ -123,13 +123,17 @@ int main(int argc, char **argv)
//prepare the directories
param.tmp_dir = tmpnam(nullptr);
if(param.debug)
cerr << "temporary dir: " << (param.tmp_dir) << endl;
try
{
create_directories(param.dest_dir);
create_directories(param.tmp_dir);
}
catch (...)
catch (const string & s)
{
cerr << s << endl;
return -1;
}

View File

@ -132,6 +132,8 @@ const char * base64stream::base64_encoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh
void create_directories(string path)
{
if(path.empty()) return;
size_t idx = path.rfind('/');
if(idx != string::npos)
{