Pale Moon 3.6.* Fails to Append Downloaded File Timestamp

Add-ons for Pale Moon and other UXP Applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

ascii_elite

Re: Pale Moon 3.6.* Fails to Append Downloaded File Timestam

Unread post by ascii_elite » 2012-02-28, 20:21

Moonchild wrote:There is nothing about nsIFile that I can change - it is 100% the same as official Mozilla Firefox builds.
Do you use code from different version of the Firefox source? For example, using code from earlier version of Firefox source code for download manager, code from recent version of Firefox source code for GUI, some other version of Firefox source code for Gecko rendering engine, etc.
Moonchild wrote:If this is a result of timing issues, which it seems to be considering it works if the file already exists, then I'm afraid the add-on simply won't work on the Pale Moon equivalent because it does things too fast. It would need a purposeful delay in the add-on before trying to set the timestamp so the file system and OS back-end would be done with their administration/configuration of the file before trying to change file attributes.
So the problem would be correctable in the extension by adding a delay? If this is son, how much of a delay should be necessary for significance?


EDIT: I make note that the behavior to modify the downloaded file's timestamp is not is added by different extensions (typically ones that modify or "enhance" the downloaded manager), though I have not use any of the others.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 30806
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Pale Moon 3.6.* Fails to Append Downloaded File Timestam

Unread post by Moonchild » 2012-02-29, 09:23

Do you use code from different version of the Firefox source?
No, doing that is dangerous. In a complex program like this, it would likely break dependencies. The only adopted code from other versions are individual bugfixes for isolated problems.

Although you do make me think about one major difference here: Pale Moon does not include the code for the "download scanner". If the add-on uses the interface with Firefox that is normally used to trigger an anti-virus scan after download to set the date/time (which would be a little odd, but possible), then the add-on will simply never work. Only Sparky can answer that question, though.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
"It kind of sucks when you realize that being human is a scarce commodity." -- Bob Bilheimer
Image

ascii_elite

Re: Pale Moon 3.6.* Fails to Append Downloaded File Timestam

Unread post by ascii_elite » 2012-03-01, 00:42

Moonchild wrote:Although you do make me think about one major difference here: Pale Moon does not include the code for the "download scanner". If the add-on uses the interface with Firefox that is normally used to trigger an anti-virus scan after download to set the date/time (which would be a little odd, but possible), then the add-on will simply never work. Only Sparky can answer that question, though.
I shall attempt to communicate this information and potential timing issue described hereinbefore in this thread to Bluefang.

ascii_elite

Re: Pale Moon 3.6.* Fails to Append Downloaded File Timestam

Unread post by ascii_elite » 2012-03-09, 19:17

Moonchild wrote:Although you do make me think about one major difference here: Pale Moon does not include the code for the "download scanner". If the add-on uses the interface with Firefox that is normally used to trigger an anti-virus scan after download to set the date/time (which would be a little odd, but possible), then the add-on will simply never work. Only Sparky can answer that question, though.
The information has been conveyed to the Preserve Download Modification Timestamp extension developer and is documented at: http://forums.mozillazine.org/viewtopic ... 5&start=30 .

The response from the Preserve Download Modification Timestamp 2011.03.21.22 extension developer is:
Bluefang from http://forums.mozillazine.org/viewtopic.php?f=48&t=1984565&start=30 wrote:That's a load of crock. I think the developer is drinking a bit too much of his own Kool-Aid. PaleMoon is negligibly faster than vanilla Firefox. Even if it was significantly faster, that would suggest that Firefox would have different behavior depending on how fast your computer was, which is not the case. Also:

* The "download finished" event triggers after Firefox is finished messing around with the file.
* The extension checks to make sure the file exists before attempting to modify it.

The extension does not use the DL scanning API. However, if not careful, its removal could potentially change the behavior and/or order of download status events, which would affect the extension.

ascii_elite

Re: Pale Moon 3.6.* Fails to Append Downloaded File Timestam

Unread post by ascii_elite » 2012-03-09, 19:35

Preserve Download Modification Timestamp 2011.03.21.22 does not use any compiled binaries. The Preserve Download Modification Timestamp 2011.03.21.22 source code is available in its entirety within the directory structure of the extension.

The code is not not very long; much of the size of the extension is due to the localization files.

I believe that the following code is what would be relevant to examine to determine how Pale Moon behaves or should behave with the extension, and to determine what, if anything, is causing the failure described in this thread.

Admin note: code removed.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 30806
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Pale Moon 3.6.* Fails to Append Downloaded File Timestam

Unread post by Moonchild » 2012-03-11, 11:55

OK, I'm locking this topic after this post, since it's obviously veering of on tangents that are not intended:
  • Crossposting like this between mozillazine forums and here is not a good thing to do
  • I was merely making a educated guess about how the code works. I don't have the time, nor the desire to look at code for an extension I didn't write and don't see the point of even having. I have better things to do with my time. Pasting the full add-on code in this forum is pointless, and I'll remove the code after I post this reply. Kindly only quote relevant snippets from code in a forum post in the future.
  • I wasn't telling the add-on developer that his add-on isn't working, is faulty, is badly programmed or the like, which he seems to think judging by his Kool-Aid comment and "A load of crock". It may simply not work in Pale Moon, or even may simply not work on your particular system (I haven't tried it out myself, any volunteers want to verify?)
If the mozillazine thread has any misinterpretations of what I wrote, please correct them there.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
"It kind of sucks when you realize that being human is a scarce commodity." -- Bob Bilheimer
Image

Locked