Pale Moon 3.6.* Fails to Append Downloaded File Timestamp

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

Moderators: FranklinDM, Lootyhoof

ascii_elite

Pale Moon 3.6.* Fails to Append Downloaded File Timestamp

Unread post by ascii_elite » 2012-02-13, 01:05

Using Pale Moon 3.6.29 with extension Preserve Download Modification Timestamp 2011.03.21.22 on operating system Windows 2000 Professional with Service Pack 4 or Windows XP Professional with Service Pack 2, file date and time from file on server is not applied to downloaded file if the file completes downloading prior to selecting where and to what name to save the file.

Preserve Download Modification Timestamp 2011.03.21.22 is a Mozilla Firefox extension created by Sparky Bluefang to "Preserve the modification timestamp, sent by the server, for downloaded files". Web pages with information about it may be found:
The failing to preserve the server file date and time seems to have been a known issue with Firefox. That issue however seems to have been fixed some time ago (See Bug 595785). Current version of Firefox 3.6 series (3.6.26) does not seem have the problem described herein.

Please correct the problem.
Last edited by ascii_elite on 2012-02-28, 03:34, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35593
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon 3.6.29 Fails to Append Downloaded File Timesta

Unread post by Moonchild » 2012-02-13, 06:06

The patch for bug #595785 should already be included in Pale Moon 3.6.x, but I'll double-check and implement if not, for the next point release.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ascii_elite

Re: Pale Moon 3.6.29 Fails to Append Downloaded File Timesta

Unread post by ascii_elite » 2012-02-22, 03:13

Moonchild wrote:The patch for bug #595785 should already be included in Pale Moon 3.6.x, but I'll double-check and implement if not, for the next point release.
Today, I updated to Pale Moon 3.6.30. I then tried to download something with a known timestamp that was different than the current time at the time.

The downloaded file was assigned the current time at the time and not the that of the server copy of the file.

Is it known that the bug #595785 patch is implemented in Pale Moon 3.6.30?

Something I am curious about: Firefox has bugs fixed. I would have thought that its source code that is available to download contain the fixes. Does the source code not contain the fixes or not all of the fixes that are implemented for a release?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35593
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon 3.6.29 Fails to Append Downloaded File Timesta

Unread post by Moonchild » 2012-02-22, 08:28

Is it known that the bug #595785 patch is implemented in Pale Moon 3.6.30?
That bug has been fixed in 3.6.x - I checked the source and the patch was already in place.
You have to realize that saving a file with the current date/time is normal and expected behavior!
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ascii_elite

Re: Pale Moon 3.6.29 Fails to Append Downloaded File Timesta

Unread post by ascii_elite » 2012-02-22, 18:38

Moonchild wrote:You have to realize that saving a file with the current date/time is normal and expected behavior!
I know. However, I try to modify that behavior by using the Preserve Download Modification Timestamp 2011.03.21.22 extension. With the extension installed, Firefox or Pale Moon should be able to append the server file timestamp to the downloaded file. Notwithstanding the Eset NOD32 issue explained in the Preserve Download Modification Timestamp mozillaZine thread (see first post of this thread), the appending of the file timestamp from server occurs on Firefox 3.6.26, but not on Pale Moon 3.6.30 when the Preserve Download Modification Timestamp extension is installed and the download is allowed to complete before specifying the directory and name for the save of the file.

As a side note: The extension was made by the same person that made the Status-4-Evar extension that your Pale Moon status bar extension is based on.
Moonchild wrote:
Is it known that the bug #595785 patch is implemented in Pale Moon 3.6.30?
That bug has been fixed in 3.6.x - I checked the source and the patch was already in place.
Why else could the problem be occurring?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35593
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon 3.6.29 Fails to Append Downloaded File Timesta

Unread post by Moonchild » 2012-02-22, 23:26

I'm not sure what the difference would be in that respect between Firefox and Pale Moon. Also, since I didn't program the add-on, there isn't really much support I can give - it's quite possible the plugin tries to hook into the browser in a way that isn't supported (e.g. because of branding differences). I can only guess. It's obviously an add-on that isn't doing something straightforward. It may even be related to Pale Moon not having the same permissions in your O.S. that Firefox has (depending on security software you may have). In any case it seems to be an interaction problem to be looked at by the add-on author rather than the browser developer.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ascii_elite

Re: Pale Moon 3.6.29 Fails to Append Downloaded File Timesta

Unread post by ascii_elite » 2012-02-23, 00:36

I thought that might be the case.

I shall try to communicate the information to the extension developer.

ascii_elite

Re: Pale Moon 3.6.29 Fails to Append Downloaded File Timesta

Unread post by ascii_elite » 2012-02-28, 04:29

Moonchild wrote:...it's quite possible the plugin tries to hook into the browser in a way that isn't supported (e.g. because of branding differences). ...It's obviously an add-on that isn't doing something straightforward. ...In any case it seems to be an interaction problem to be looked at by the add-on author rather than the browser developer.
The information has been communicated to the add-on developer, and the communication 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:The line where it is failing is a call into Mozilla code (nsIFile.lastModifiedTime). This works on all officially supported versions (Firefox 3.5+ and SeaMonkey 2.0+).

If it is failing for you, then it was something changed on PaleMoon or something on your system interfering with it (i.e. preventing it from modifying the file system). I have no control of what happens after this point, so it's not the extension's fault.
The problem manifest on the systems regardless as to whether there is or was any security software installed (I tested this).

The problem manifests while logged in as Administrator with full read and write privileges on my and other systems (all of which run either Windows 2000 family or Windows XP family operating systems). Pale Moon and Firefox were installed normally by using Administrator account, and they were not given any special privileges. The problem does not manifest for recent Firefox 3.6.x on the the same systems. If a save directory and file name are specified to Pale Moon before the completion of the download, the correct timestamp is appended.

The problem seems to of Pale Moon or the Preserve Download Modification Timestamp 2011.03.21.22 extension. Considering that the behavior it seems more likely to me that the problem is with Pale Moon (it is behaving like Firefox once behaved prior to fixing the issue).

The extension developer has stated "The line where it is failing is a call into Mozilla code (nsIFile.lastModifiedTime)" and links to page https://developer.mozilla.org/en/XPCOM_ ... ce/nsIFile .

Moonchild, would you please look into this?

User avatar
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

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

Unread post by satrow » 2012-02-28, 04:59

Please forgive my ignorance in these matters, I'm a user and tester of Pale Moon, I really have no clue as to the inner workings.

This isn't just something as simple as already having a download location preset within Pale Moon's options, is it - so the data auto-downloads without a prompt?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35593
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

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

Unread post by Moonchild » 2012-02-28, 09:57

There is nothing about nsIFile that I can change - it is 100% the same as official Mozilla Firefox builds.

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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

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: 35593
Joined: 2011-08-28, 17:27
Location: Motala, 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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

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: 35593
Joined: 2011-08-28, 17:27
Location: Motala, 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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked