Closed
Bug 506696
Opened 15 years ago
Closed 15 years ago
[WinCE] updater.exe doesn't use the working directory when applying the update
Categories
(Toolkit :: Application Update, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)
References
Details
(Whiteboard: [nv])
Attachments
(1 file, 6 obsolete files)
23.58 KB,
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
There are also a few return codes that aren't correct for the functions they emulate in updater_wince.cpp
Assignee | ||
Updated•15 years ago
|
Whiteboard: [nv]
Assignee | ||
Updated•15 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•15 years ago
|
||
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #391220 -
Attachment is obsolete: true
Assignee | ||
Comment 3•15 years ago
|
||
Assignee | ||
Comment 4•15 years ago
|
||
Comment on attachment 391306 [details] [diff] [review] patch in progress Benjamin, the updater on WinCE / WinMo needs to use the working-dir command line arg since they don't have a concept of a working directory. Since the arg is a WCHAR I went ahead and converted XP_WIN to use WCHAR where applicable. I've tested this on WinMo / Vista (I'll verify it works on WinCE tomorrow) and I sent the patch to the try server. There is some cleanup of updater_wince.cpp that I haven't done yet.
Attachment #391306 -
Flags: review?(benjamin)
Assignee | ||
Comment 5•15 years ago
|
||
Comment on attachment 391306 [details] [diff] [review] patch in progress note to self: don't request review when half asleep
Attachment #391306 -
Attachment is obsolete: true
Attachment #391306 -
Flags: review?(benjamin)
Assignee | ||
Comment 6•15 years ago
|
||
Assignee | ||
Comment 7•15 years ago
|
||
Benjamin, the updater on WinCE / WinMo needs to use the working-dir command line arg since they don't have a concept of a working directory. Since the arg is a WCHAR I went ahead and converted XP_WIN to use WCHAR where applicable. I've tested this on WinMo / WinCE / WinVista and I sent the patch to the try server.
Attachment #391311 -
Attachment is obsolete: true
Attachment #391423 -
Flags: review?(benjamin)
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Comment 8•15 years ago
|
||
Comment on attachment 391423 [details] [diff] [review] patch rev1 At a rather skimming pace this looks correct.
Attachment #391423 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 9•15 years ago
|
||
Comment on attachment 391423 [details] [diff] [review] patch rev1 Brad, could I get you to review these changes? Thanks
Attachment #391423 -
Flags: review?(bugmail)
Assignee | ||
Comment 10•15 years ago
|
||
note: this passed the Linux try unit tests
Assignee | ||
Comment 11•15 years ago
|
||
Also passed the Mac OS X try unit tests
Assignee | ||
Comment 12•15 years ago
|
||
Also passed the WINNT try unit tests
Comment 13•15 years ago
|
||
Comment on attachment 391423 [details] [diff] [review] patch rev1 >-# define mkdir(path, perms) _mkdir(path) >+# define mkdir(path, perms) _wmkdir(path) perhaps this should be tmkdir since it will be wide on some platforms and narrow on others > // Run from the specified working directory (see bug 312360). > if(NS_tchdir(workingDir) != 0) > LOG(("Warning: chdir failed")); > >+ // Run from the specified working directory (see bug 312360). >+ NS_tchdir(workingDir); >+ why are you calling NS_tchdir(workingDir) twice? Also, we don't need the comment twice
Attachment #391423 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 14•15 years ago
|
||
Thanks Brad! (In reply to comment #13) > (From update of attachment 391423 [details] [diff] [review]) > > >-# define mkdir(path, perms) _mkdir(path) > >+# define mkdir(path, perms) _wmkdir(path) > > perhaps this should be tmkdir since it will be wide on some platforms and > narrow on others Agreed and will change > > // Run from the specified working directory (see bug 312360). > > if(NS_tchdir(workingDir) != 0) > > LOG(("Warning: chdir failed")); > > > >+ // Run from the specified working directory (see bug 312360). > >+ NS_tchdir(workingDir); > >+ > > why are you calling NS_tchdir(workingDir) twice? Also, we don't need the > comment twice I had a bad merge and will fix this
Assignee | ||
Comment 15•15 years ago
|
||
Carrying forward r+
Attachment #391229 -
Attachment is obsolete: true
Attachment #391423 -
Attachment is obsolete: true
Attachment #391468 -
Flags: review+
Assignee | ||
Comment 16•15 years ago
|
||
The previous patch was with -w and this cleans up a couple of bracket inconsistencies that have crept in over time. I'll check this in as soon as the tree is green.
Attachment #391468 -
Attachment is obsolete: true
Attachment #391525 -
Flags: review+
Assignee | ||
Comment 17•15 years ago
|
||
Pushed to mozilla-central http://hg.mozilla.org/mozilla-central/rev/b4a6eaf4a569 along with updated tests http://hg.mozilla.org/mozilla-central/rev/04a7efa84f87
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Comment 18•15 years ago
|
||
Comment on attachment 391525 [details] [diff] [review] patch >+# define stat _stat Out of interest, what is this supposed to do? (VC7.1 doesn't like it.)
Assignee | ||
Comment 19•15 years ago
|
||
On Windows _stat and _wstat takes the struct _stat as a param and iirc some of the WinCE work in one of the other file (archivereader.cpp I believe) required this for non WinCE. http://msdn.microsoft.com/en-us/library/14h5k7ff%28VS.80%29.aspx I'll take a look at reworking this in the next day or two.
Comment 20•15 years ago
|
||
I was able to work around the problem by moving the #define stat _stat after the #include <sys/stat.h> and I also had to #define fstat _fstat too. @@ -#ifndef WINCE -# define stat _stat -#endif @@ #ifdef WINCE #include updater_wince.h +#elif defined(XP_WIN) +#define stat _stat +#define fstat _fstat #endif
You need to log in
before you can comment on or make changes to this bug.
Description
•