From: <hug...@li...> - 2010-09-20 17:44:06
|
branch: details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/c97570168646 changeset: 4396:c97570168646 user: tmodes date: Mon Sep 20 19:43:23 2010 +0200 description: Better handling of path prefix for cpfind/icpfind diffstat: src/hugin1/icpfind/icpfind.cpp | 2 +- src/hugin_base/panodata/Panorama.cpp | 2 +- src/hugin_cpfind/cpfind/PanoDetector.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diffs (36 lines): diff -r 3742a6e7ebe2 -r c97570168646 src/hugin1/icpfind/icpfind.cpp --- a/src/hugin1/icpfind/icpfind.cpp Mon Sep 20 18:52:18 2010 +0200 +++ b/src/hugin1/icpfind/icpfind.cpp Mon Sep 20 19:43:23 2010 +0200 @@ -108,7 +108,7 @@ cerr << "could not open script : " << file.char_str() << endl; return 1; } - if(!newPano.loadPTScript(in, ptoVersion)) + if(!newPano.loadPTScript(in, ptoVersion,hugin_utils::getPathPrefix((std::string)file.mb_str(HUGIN_CONV_FILENAME)))) { cerr << "could not parse script: " << file.char_str() << endl; return 1; diff -r 3742a6e7ebe2 -r c97570168646 src/hugin_base/panodata/Panorama.cpp --- a/src/hugin_base/panodata/Panorama.cpp Mon Sep 20 18:52:18 2010 +0200 +++ b/src/hugin_base/panodata/Panorama.cpp Mon Sep 20 19:43:23 2010 +0200 @@ -2262,7 +2262,7 @@ string file = iImgInfo[i].filename; // add prefix if only a relative path. #ifdef WIN32 - bool absPath = ( (file[1]==':' && file[2]=='\\') || (file[0] == '\\' && file[1] == '\\')); + bool absPath = ( (file[1]==':' && file[2]=='\\') || (file[1]==':' && file[2]=='/') || (file[0] == '\\' && file[1] == '\\')); #else bool absPath = file[0] == '/'; #endif diff -r 3742a6e7ebe2 -r c97570168646 src/hugin_cpfind/cpfind/PanoDetector.cpp --- a/src/hugin_cpfind/cpfind/PanoDetector.cpp Mon Sep 20 18:52:18 2010 +0200 +++ b/src/hugin_cpfind/cpfind/PanoDetector.cpp Mon Sep 20 19:43:23 2010 +0200 @@ -384,7 +384,7 @@ cerr << "ERROR: could not open file: '" << _inputFile << "'!" << endl; return false; } - //_prefix=hugin_utils::getPathPrefix(_inputFile); + _prefix=hugin_utils::getPathPrefix(_inputFile); if(_prefix.empty()) { // Get the current working directory: |