<blockquote>
<p>Naw, it's technically the "right thing". mtime is only updated when the contents are changed. When you copy and overwrite/paste a file in a file manager, you're essentially deleting the destination file, and putting the copied file in its place.</p>
</blockquote>
<p>Yeah, the file mangler is <strong>replacing</strong> the file, in fact mine even says "do you want to replace" in its dialog :)</p>
<p>Geany is checking for a file having its contents changed, not the file itself being replaced.</p>
<blockquote>
<p>What Geany should probably do is use the ctime, which covers both the contents and metadata.</p>
</blockquote>
<p>But st_ctime doesn't cover a file having its contents changed "The field st_ctime is changed by writing or by setting inode information (i.e., owner, group, link count, mode, etc.)" (from <code>man 7 inode</code>).</p>
<p>And on Windows <a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=vs-2019" rel="nofollow">IIGC</a> st_ctime is creation time not metadata time.</p>
<p>I am not sure why Geany doesn't test equals which would handle both.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2133#issuecomment-487482070">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2PH36DZRL7TDILUJ3PS2SKLANCNFSM4HI2SZYQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ6PVOES7546VP3P57LPS2SKLANCNFSM4HI2SZYQ.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #2133: \u003e Naw, it's technically the \"right thing\". mtime is only updated when the contents are changed. When you copy and overwrite/paste a file in a file manager, you're essentially deleting the destination file, and putting the copied file in its place.\r\n\r\nYeah, the file mangler is __replacing__ the file, in fact mine even says \"do you want to replace\" in its dialog :)\r\n\r\nGeany is checking for a file having its contents changed, not the file itself being replaced.\r\n\r\n\u003e What Geany should probably do is use the ctime, which covers both the contents and metadata.\r\n\r\nBut st_ctime doesn't cover a file having its contents changed \"The field st_ctime is changed by writing or by setting inode information (i.e., owner, group, link count, mode, etc.)\" (from `man 7 inode`).\r\n\r\nAnd on Windows [IIGC](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=vs-2019) st_ctime is creation time not metadata time. \r\n\r\nI am not sure why Geany doesn't test equals which would handle both."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/2133#issuecomment-487482070"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2133#issuecomment-487482070",
"url": "https://github.com/geany/geany/issues/2133#issuecomment-487482070",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>