X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flib%2Finstalledfile.cpp;h=bf542b0082feafe7ad427c04180511f020e0964d;hb=f4de41c810319d3ecc8bb5084de06a953037b7b7;hp=6e45ad27efc66ac65d8e9643b1763c75a4811a17;hpb=c8e829c219c65ff8e93b6c7b66212ff0876441c5;p=builder.git diff --git a/source/lib/installedfile.cpp b/source/lib/installedfile.cpp index 6e45ad2..bf542b0 100644 --- a/source/lib/installedfile.cpp +++ b/source/lib/installedfile.cpp @@ -26,27 +26,23 @@ FS::Path InstalledFile::generate_target_path(const FS::Path &global_prefix, cons if(!tgt.get_package()) throw invalid_argument("No private install location for "+tgt.get_name()); - prefix = tgt.get_package()->get_temp_directory(); + prefix = tgt.get_package()->get_staging_directory(); mid = loc.substr(2); } else { prefix = global_prefix; + mid = loc; + } - if(!loc.empty()) - mid = loc; - else if(const Component *comp = tgt.get_component()) + if(mid.empty()) + if(const Component *comp = tgt.get_component()) mid = comp->get_install_map().get_install_location(tgt); - } if(mid.empty()) mid = tgt.get_install_location(); - string fn = tgt.get_install_filename(); - if(fn.empty()) - fn = FS::basename(tgt.get_path()); - - return prefix/mid/fn; + return prefix/mid/FS::basename(tgt.get_path()); } void InstalledFile::set_symlink(const FS::Path &l)