[PATCH] D17104: [VFS] Drop path traversal assertion

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 10 14:53:32 PST 2016


benlangmuir added a comment.

Please clarify what you mean here:

> The rationale is that if source and destination paths in the YAML file contain ".." this is enough

>  for the file manager to retrieve the right file, meaning that it doesn't matter how we write it

>  since the FileManager is capable of transforming it in real/feasible paths.


The VFS layer does not have access to the FileManager.  I agree that ".." in a destination path should be fine.  But ".." in a source path will only work if we have code in the redirecting file system to handle ".." explicitly, which AFAICT we don't:

  RedirectingFileSystem::lookupPath(sys::path::const_iterator Start,
                                    sys::path::const_iterator End, Entry *From) {
    if (Start->equals("."))
      ++Start;
  
    // FIXME: handle ..


http://reviews.llvm.org/D17104





More information about the cfe-commits mailing list