mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Patch by phx to support -C in all cases
This commit is contained in:
parent
d5d5de1d7e
commit
fd76cff5f0
@ -202,8 +202,8 @@ help() {
|
||||
|
||||
" -C <extract_dir>\n"
|
||||
|
||||
" With -x, change to the named directory before extracting files;\n"
|
||||
" that is, extract subfiles into the named directory.\n\n"
|
||||
" Change to the named directory before working on files;\n"
|
||||
" that is, extraction/creation/update and replace will be based on this path\n\n"
|
||||
|
||||
" -O\n"
|
||||
" With -x, extract subfiles to standard output instead of to disk.\n\n"
|
||||
@ -419,6 +419,12 @@ add_files(const vector_string ¶ms) {
|
||||
filenames.push_back(subfile_name);
|
||||
}
|
||||
|
||||
// Change current working directory, if requested.
|
||||
if (got_chdir_to && chdir(chdir_to.c_str()) != 0) {
|
||||
cout << "Failed to chdir to " << chdir_to << ": " << strerror(errno) << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool okflag = do_add_files(multifile, filenames);
|
||||
|
||||
bool needs_repack = multifile->needs_repack();
|
||||
|
Loading…
x
Reference in New Issue
Block a user