# # patch "ChangeLog" # from [62849fc5365d13a37008da533fbda5b92f92fbd9] # to [e6cef899d744a09c3f9ce141ea3977fa378cc7da] # # patch "win32/fs.cc" # from [38ce311dec5f6b399c799ff10cc3e8c8dae4429c] # to [dc98eb08c96cda5ca2e73e8a29dea19cb40b00bf] # # patch "win32/inodeprint.cc" # from [b861168f4636365c587b88177629559acfad329e] # to [958ef1bcb5ee1711a55894151ed1742fa3074ddc] # ======================================================================== --- ChangeLog 62849fc5365d13a37008da533fbda5b92f92fbd9 +++ ChangeLog e6cef899d744a09c3f9ce141ea3977fa378cc7da @@ -1,5 +1,11 @@ 2005-08-30 Matthew Gregan + * win32/inodeprint.cc (inodeprint_file): Update to use new path + handling code. + * win32/fs.cc (tilde_expand): Compile fix. + +2005-08-30 Matthew Gregan + * revision.cc (ensure_parents_loaded): Don't reuse an iterator after we've invalidated it. Fixes 'diff' crash reported by Howard Spindel. ======================================================================== --- win32/fs.cc 38ce311dec5f6b399c799ff10cc3e8c8dae4429c +++ win32/fs.cc dc98eb08c96cda5ca2e73e8a29dea19cb40b00bf @@ -80,9 +80,11 @@ } utf8 -tilde_expand(utf8 const & path) +tilde_expand(utf8 const & in) { - fs::path tmp(path(), fs::native); + if (in().empty() || in()[0] != '~') + return in; + fs::path tmp(in(), fs::native); fs::path::iterator i = tmp.begin(); if (i != tmp.end()) { @@ -93,7 +95,7 @@ ++i; } while (i != tmp.end()) - res /= mkpath(*i++); + res /= *i++; return res.string(); } ======================================================================== --- win32/inodeprint.cc b861168f4636365c587b88177629559acfad329e +++ win32/inodeprint.cc 958ef1bcb5ee1711a55894151ed1742fa3074ddc @@ -29,7 +29,7 @@ bool inodeprint_file(file_path const & file, hexenc & ip) { struct _stati64 st; - if (_stati64(localized_as_string(file).c_str(), &st) < 0) + if (_stati64(file.as_external().c_str(), &st) < 0) return false; Botan::SHA_160 hash; @@ -38,7 +38,7 @@ add_hash(hash, st.st_dev); add_hash(hash, st.st_size); - HANDLE filehandle = CreateFile(file().c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE filehandle = CreateFile(file.as_external().c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (filehandle == INVALID_HANDLE_VALUE) return false;