Pass absolute path to directoryExists#46086
Conversation
As pointed out by @gretzkiy, the `directoryExists` call added to `matchFiles` in microsoft#44710 should have been passing the absolute path (since the current directory might not match `currentDirectory`).
|
Reported here. |
|
@DanielRosenwasser @andrewbranch Do we want to include this in the next 4.4 patch? |
|
The reason we thought there could be a mistake in // We also need to check the relative paths by converting them to absolute and normalizing
// in case they escape the base path (e.g "..\somedirectory")
const absolute: string = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));which does not produce an absolute path if neither |
|
@typescript-bot perf test this |
|
Heya @DanielRosenwasser, I've started to run the perf test suite on this PR at ba70c53. You can monitor the build here. Update: The results are in! |
|
@DanielRosenwasser Here they are:Comparison Report - main..46086
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think this needs a test, and I know you (@amcasey) are kind of swamped this week. We probably won't block the beta on this. |
|
Added a test and moved the absolutification to where I think it should go. This allowed us to delete a parameter from the local |
This reverts commit 55b4928.
Component commits: 931b504 Revert "Fix RWC missing file detection (microsoft#46673)" This reverts commit 4a065f5. afef282 Revert "Pass absolute path to directoryExists (microsoft#46086)" This reverts commit 55b4928. f1a20b3 Revert "Reduce exceptions (microsoft#44710)" This reverts commit c0d5c29. 56842cd Add back system watcher limit
Component commits: 931b504 Revert "Fix RWC missing file detection (#46673)" This reverts commit 4a065f5. afef282 Revert "Pass absolute path to directoryExists (#46086)" This reverts commit 55b4928. f1a20b3 Revert "Reduce exceptions (#44710)" This reverts commit c0d5c29. 56842cd Add back system watcher limit Co-authored-by: Andrew Branch <andrew@wheream.io>
* Pass absolute path to directoryExists As pointed out by @gretzkiy, the `directoryExists` call added to `matchFiles` in microsoft#44710 should have been passing the absolute path (since the current directory might not match `currentDirectory`). * Add test, simplify/clarify/fix matchFiles and friends Co-authored-by: Andrew Branch <andrew@wheream.io>
…46787) * Revert "Fix RWC missing file detection (microsoft#46673)" This reverts commit 4a065f5. * Revert "Pass absolute path to directoryExists (microsoft#46086)" This reverts commit 55b4928. * Revert "Reduce exceptions (microsoft#44710)" This reverts commit c0d5c29. * Add back system watcher limit
As pointed out by @gretzkiy, the
directoryExistscall added tomatchFilesin #44710 should have been passing the absolute path (sincethe current directory might not match
currentDirectory).Fixes #45990