When working directory contains # sign, it is truncated

Bug #893991 reported by Victor Kropp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
High
Charlie Poole

Bug Description

For example, my assembly with tests located in C:\path\to\my\C#\project

In test I call Console.WriteLine(Environment.CurrentDirectory) and get only "C:\path\to\my" in output.

Reproduced on 2.5.10.

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote :

This seems to be a regression on a bug we fixed in the past. We set the current directory
to the LocalPath of the assembly Codebase, which stops at a # because of the special
meaning of # within a URL. In a past version we replaced LocalPath with our own
logic, but I suspect we have lost that change.

Changed in nunitv2:
status: New → Triaged
importance: Undecided → High
Changed in nunitv2:
assignee: nobody → Charlie Poole (charlie.poole)
status: Triaged → In Progress
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Not really a regression per se. It turns out there is separate code in two different layers of NUnit for translating the CodeBase of an assembly into a local path. The problem was fixed in the layer where it came up, but we had no bug for the other code. I'll try to unify the code if possible or - if it isn't - duplicate the fix.

Changed in nunitv2:
status: In Progress → Fix Committed
Changed in nunitv2:
milestone: none → 2.6.0
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.