File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -47,17 +47,6 @@ Date: June 2006
47
47
" size=\" 30,40\" ;" \
48
48
" ratio=compress;"
49
49
50
- // the following are for chdir
51
-
52
- #if defined(__linux__) || \
53
- defined (__FreeBSD_kernel__) || \
54
- defined(__GNU__) || \
55
- defined(__unix__) || \
56
- defined(__CYGWIN__) || \
57
- defined(__MACH__)
58
- #include < unistd.h>
59
- #endif
60
-
61
50
#ifdef _WIN32
62
51
#include < util/pragma_push.def>
63
52
#ifdef _MSC_VER
@@ -66,7 +55,6 @@ Date: June 2006
66
55
#endif
67
56
#include < direct.h>
68
57
#include < windows.h>
69
- #define chdir _chdir
70
58
#define popen _popen
71
59
#define pclose _pclose
72
60
#include < util/pragma_pop.def>
@@ -247,11 +235,7 @@ bool compilet::add_files_from_archive(
247
235
}
248
236
249
237
tmp_dirs.push_back (tstr);
250
- if (chdir (tmp_dirs.back ().c_str ())!=0 )
251
- {
252
- error () << " Cannot switch to temporary directory" << eom;
253
- return true ;
254
- }
238
+ set_current_path (tmp_dirs.back ());
255
239
256
240
// unpack now
257
241
cmd << " ar x " << concat_dir_file (working_directory, file_name);
@@ -294,8 +278,8 @@ bool compilet::add_files_from_archive(
294
278
pclose (stream);
295
279
}
296
280
297
- if (!thin_archive && chdir (working_directory. c_str ()) != 0 )
298
- error () << " Could not change back to working directory " << eom ;
281
+ if (!thin_archive)
282
+ set_current_path (working_directory) ;
299
283
300
284
return false ;
301
285
}
You can’t perform that action at this time.
0 commit comments