Thanks for the suggested workaround. However, I don't want to bypass the
warning, I need to explore why the warning is happening at all (it
shouldn't). In order to do that, I need to simply get the file times (new
and old) and the checksums (new and old) and write them to the log pane.
So, as an example, looking in the leoExternalFiles.py file, I find this
node: `class ExternalFilesController>efc.utilities>efc.get_mtime`:
def get_mtime(self, path):
'''Return the modification time for the path.'''
return g.os_path_getmtime(path)
Then later in the same path: `efc.has_changed'
def has_changed(self, c, path):
'''Return True if p's external file has changed outside of Leo.'''
if not g.os_path_exists(path):
return False
if g.os_path_isdir(path):
return False
#
# First, check the modification times.
old_time = self.get_time(path)
new_time = self.get_mtime(path)
if not old_time:
# Initialize.
self.set_time(path, new_time)
self.checksum_d[path] = self.checksum(path)
return False
if old_time == new_time:
# print('%s:times match %s %s' % (tag,c.shortFileName(),path))
return False
#...(code continues)...
Here, it appears to call the function (method?) defined earlier to get the
file times using `self` and `path`, but I don't see anywhere in the file
how to define what `self` and `path` are. I'm sure this is probably pretty
basic Python stuff, but it's not obvious to me:-(
I will keep banging on this problem and perhaps will have additional
questions and comments later.
I don't know how you plan to solve this issue, but here are few hints. You
> most probably need to get the modification time of the external files after
> some synchronization with the cloud. Once you have those times you should
> call
>
> g.app.externalFilesController.set_time(filename, new_time)
>
> That will ensure that Leo doesn't notice this change, and therefore Leo
> won't ask you about it.
>
> If you know that synchronization with cloud takes at most 3s (for
> example), you can disable checking of external files for 3s every time
> synchronization happens.
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.