Closed
Bug 379347
Opened 18 years ago
Closed 17 years ago
sig_file-rel should eliminate "../" in paths
Categories
(Thunderbird :: Preferences, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mozilla.org, Assigned: mscott)
Details
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.3) Gecko/20070331 Firefox/2.0.0.3
Build Identifier: version 2.0.0.0 (20070425)
By reducing the relative path to the minimum, the system should be more robust at handling e.g. the moving of the profile contents to a parent directory.
Reproducible: Always
Actual Results:
Something like "[ProfD]../../../../../usr/home/username/settings/Thunderbird/Profile/signature.txt".
Expected Results:
For the string above, "[ProfD]Profile/signature.txt".
Vim based pseudo-code for a fix:
1. Count the number of occurrences of "../" in the string as $parent_levels. E.g., the value for "[ProfD]../../../../../usr/home/username/settings/Thunderbird/Profile/signature.txt" would be 5.
2. :%s/\.\.\///g - Remove all occurrences of "../". The string above would then be "[ProfD]usr/home/username/settings/Thunderbird/Profile/signature.txt".
3. :%s/\[ProfD\]\([^/]*\/\)\{$parent_levels}/[ProfD]/g - Replace $parent_levels occurrences of "something/". The string above would then be "[ProfD]Profile/signature.txt".
Comment 1•17 years ago
|
||
Can you reproduce with Thunderbird v2.0.0.14 ?
(or Thunderbird v3.0a1pre ?)
Version: unspecified → 2.0
| Reporter | ||
Comment 2•17 years ago
|
||
I could /not/ reproduce in 2.0.0.14 - Thank you!
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 3•17 years ago
|
||
(In reply to comment #2)
> I could /not/ reproduce in 2.0.0.14 - Thank you!
>
No specific bug mentioned -> Works for me.
Resolution: FIXED → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•