File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
notebook/static/notebook/js Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2731,7 +2731,10 @@ define([
2731
2731
return this . contents . get ( this . notebook_path , { content : false } ) . then (
2732
2732
function ( data ) {
2733
2733
var last_modified = new Date ( data . last_modified ) ;
2734
- if ( last_modified > that . last_modified ) {
2734
+ // We want to check last_modified (disk) > that.last_modified (our last save)
2735
+ // In some cases the filesystem reports an inconsistent time,
2736
+ // so we allow 0.5 seconds difference before complaining.
2737
+ if ( ( last_modified . getTime ( ) - that . last_modified . getTime ( ) ) > 500 ) { // 500 ms
2735
2738
console . warn ( "Last saving was done on `" + that . last_modified + "`(" + that . _last_modified + "), " +
2736
2739
"while the current file seem to have been saved on `" + data . last_modified + "`" ) ;
2737
2740
if ( that . _changed_on_disk_dialog !== null ) {
You can’t perform that action at this time.
0 commit comments