Ticket #99 (closed defect: fixed)

Opened 2 years ago

Last modified 1 month ago

cfdirectory date last modified in O/S sensitive

Reported by: scorfield Owned by: scorfield
Type: defect Priority: normal
Milestone: Component: Miscellaneous
Version: 5.0 Severity: normal
Keywords: Cc:

Description

On some O/S / locale combos, cfdirectory can only return date last modified to the nearest minute. This means that circuit loading doesn't always notice the change. See ticket #96 for more details of how this originally came up.

Attachments

Change History

Changed 2 years ago by scorfield

  • owner changed from sean@corfield.org to scorfield
  • status changed from new to assigned

Notes on Java fix for this from Daniel Schmid

since I mentioned it... a temporary fix with Java java.io.File

<cfset var myCircuitFilePath = ""/>
<cfset var jCircuitFile = ""/>
<cfset var dtLastModified =""/>

I replaced between line 108 to 112 in fuseboxCircuit.cfc all the
cfdirectory with:

<cfset myCircuitFilePath = variables.fullPath & circuitFile>
<cfset jCircuitFile =
createObject("java","java.io.File").init(myCircuitFilePath)/>
<cfset dtLastModified =
createObject("java","java.util.Date").init(jCircuitFile.lastModified())/>
<cfset needToLoad = parseDateTime(dtLastModified) gt
parseDateTime(variables.timestamp) />

and as Sean posted --> variables.timestamp inside cfif at line 180

now 'development-circuit-load' mode works as expected!

Changed 2 years ago by scorfield

I looked at the Mach II code base and it doesn't do a timestamp comparison, it uses a hash of the directory lastmodified result and the size of the file (which means, of course, that it is still possible to fool it but extremely rare - the size would have to remain the same and the edit would have to occur twice in the same minute... I may use that as the solution for FB5.1 since it works for M2 and is nice and portable.

Changed 2 years ago by scorfield

  • status changed from assigned to closed
  • resolution set to fixed

(In [263]) Fixes #99 by incorporating the Java timestamp change suggested by Daniel Schmid.

Changed 2 years ago by scorfield

(In [264]) Fixes #99 again - the previous fix did not account for both circuit.xml and circuit.xml.cfm files.

Changed 2 years ago by scorfield

(In [265]) Fixes #99 for fusebox.xml files as well.

Changed 1 year ago by andt

http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=7
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=8
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=9
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=10
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=11
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=12
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=13
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=14
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=15
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=16
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=17
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=18
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=19
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=20
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=21
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=22
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=23
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=24
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=25
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=26
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=27
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=28
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=29
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=30
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=31
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=32
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=33
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=34
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=35
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=36
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=37
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=38
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=39
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=40
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=41
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=42
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=43
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=44
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=45
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=46
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=47
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=48
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=49
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=50
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=51
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=52
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=53
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=54
http://philippineadventcollege.edu.ph/forum/viewthread.php?action=attachment&tid=4&pid=55

Changed 3 months ago by airforce1

  • milestone deleted

Changed 1 month ago by add

http://www.cheap-wrought-iron.cn Wrought Iron Stair Railing. Place of origin: China Fujian ... our main products: handrails,staircase railings,wrought iron stair railing,stainless steel http://www.china-made-door.com.cn Iron decorates your home. They have a wide variety of design, assuring that you will find a special one for display at home. The metal stair railing fit in http://www.cheapwroughtiron.cn http://www.hebei-railings.cn/

Note: See TracTickets for help on using tickets.