Closed Bug 1166027 Opened 10 years ago Closed 3 years ago

OS.File.copy resolves before the file is fully copied

Categories

(Toolkit Graveyard :: OS.File, defect)

37 Branch
Unspecified
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dansmith, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0 Build ID: 20150417180217 Steps to reproduce: My code is here: https://github.com/tlsnotary/pagesigner/blob/a0dd28674da67f16bb1413d905c8273988a63562/content/firefox/firefox_specific.js#L179 In a nutshell: It does OS.File.copy(src, dst) .then(function(){ gBrowser.addTab(uri); }) where uri loads a javascript file from the dst path Actual results: The dst file appears to have been loaded in Debugger-Sources but calling one of its functions swal() returns "not defined" Expected results: swal() should have been defined.
If I simply refresh the tab, then swal() becomes available, which shows that on the first load the JS file wasnt properly loaded.
QA Whiteboard: [bugday-20150706]
Component: Untriaged → OS.File
OS: Unspecified → Linux
Product: Firefox → Toolkit

Mass closure: OSFIle is being replaced with IOUtils and PathUtils. If you think this bug was closed in error, please re-open.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.