mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +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
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user