X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstalledfile.cpp;h=723d776415df33e77c8b1fe53287746bf1dbeeab;hb=cb286fd20b9b194947b6b583bf18f8d7e57ae995;hp=35742bb0daf8e383f90418f621b438c14eb9e223;hpb=c009620591a7e80c457eabe3a2dbfc2dcfbdf5cf;p=builder.git diff --git a/source/installedfile.cpp b/source/installedfile.cpp index 35742bb..723d776 100644 --- a/source/installedfile.cpp +++ b/source/installedfile.cpp @@ -36,6 +36,9 @@ FS::Path InstalledFile::generate_target_path(const FS::Path &prefix, const FileT void InstalledFile::set_symlink(const FS::Path &l) { + FS::Path al = FS::dirname(path)/l; + if(al==path) + throw invalid_argument("InstalledFile::set_symlink"); link = FS::dirname(path)/l; builder.get_vfs().register_path(link, this); }