Last Comment Bug 901678 - Permanent Orange: TEST-UNEXPECTED-FAIL | POP3pump.js | [Exception... (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.appendRelativePath]
: Permanent Orange: TEST-UNEXPECTED-FAIL | POP3pump.js | [Exception... (NS_ERRO...
Status: RESOLVED FIXED
: intermittent-failure, regression
Product: MailNews Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All Windows XP
: -- normal (vote)
: Thunderbird 26.0
Assigned To: Mark Banner (:standard8)
:
Mentors:
Depends on:
Blocks: 896738
  Show dependency treegraph
 
Reported: 2013-08-05 14:11 PDT by Mark Banner (:standard8)
Modified: 2013-08-09 06:41 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
The fix (1.25 KB, patch)
2013-08-09 04:15 PDT, Mark Banner (:standard8)
Pidgeot18: review+
standard8: approval‑comm‑aurora+
standard8: approval‑comm‑beta+
Details | Diff | Review

Description Mark Banner (:standard8) 2013-08-05 14:11:00 PDT
Seeing this on Aurora as tests are working there - its windows only, and a regression from switching pop3d.js to be a testing module.

https://tbpl.mozilla.org/php/getParsedLog.php?id=26176069&tree=Thunderbird-Try#error0

TEST-UNEXPECTED-FAIL | ../../../resources/POP3pump.js | [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.appendRelativePath]"  nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS frame :: resource://testing-common/mailnews/pop3d.js :: readFile :: line 46"  data: no] - See following stack:
JS frame :: ../../../resources/POP3pump.js :: _testNext :: line 171
JS frame :: ../../../resources/POP3pump.js :: run :: line 209
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: getLocalMessages1 :: line 46
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: doTest :: line 135
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: createFilters :: line 39
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: doTest :: line 135
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: run_test :: line 123
JS frame :: C:\talos-slave\test\build\xpcshell\head.js :: _execute_test :: line 336
JS frame :: -e :: <TOP_LEVEL> :: line 1
native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
Comment 1 Mark Banner (:standard8) 2013-08-05 14:11:54 PDT
I've tried a couple of things including:

https://hg.mozilla.org/try-comm-central/rev/edadc22128d0

but haven't found a work around yet.

Joshua - any ideas?
Comment 2 Mark Banner (:standard8) 2013-08-09 04:12:04 PDT
Ok, appendRelativePath just doesn't like '..' in any form. Unsure why, there's one or two workarounds elsewhere, so I think we'll just do the same.
Comment 3 Mark Banner (:standard8) 2013-08-09 04:15:56 PDT
Created attachment 788084 [details] [diff] [review]
The fix

Fix for relative paths on windows, basically we'll just have to process them manually. Passed on a local VM, pushed to try here:

https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=323191210240
Comment 4 Joshua Cranmer [:jcranmer] 2013-08-09 05:42:43 PDT
Comment on attachment 788084 [details] [diff] [review]
The fix

Review of attachment 788084 [details] [diff] [review]:
-----------------------------------------------------------------

Conditional r+:

::: mailnews/test/fakeserver/pop3d.js
@@ +40,5 @@
> +    // Windows doesn't allow '..' in appendRelativePath,
> +    // so we'll have to do this the long way.
> +    if (fileName.contains('/')) {
> +      let parts = fileName.split('/');
> +      for each (let part in parts) {

for (let part of parts)

@@ +50,5 @@
> +    }
> +    else {
> +      file.append("data");
> +      file.append(fileName);
> +    }

The code for Windows is not equivalent to the code for not-Windows. This worries me slightly, but if you make the documentation on this method indicate stricter requirements on fileName (chooses a file relative to cwd/data if only a filename is provided, otherwise chooses a file relative to cwd), then I could tolerate it.
Comment 5 Mark Banner (:standard8) 2013-08-09 06:36:01 PDT
https://hg.mozilla.org/comm-central/rev/344193ca3a9e
Comment 6 Mark Banner (:standard8) 2013-08-09 06:38:37 PDT
Comment on attachment 788084 [details] [diff] [review]
The fix

[Triage Comment]
Taking onto other channels as well.

Note You need to log in before you can comment on or make changes to this bug.