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 @@ -2721,7 +2721,10 @@ define([
2721
2721
return this . contents . get ( this . notebook_path , { content : false } ) . then (
2722
2722
function ( data ) {
2723
2723
var last_modified = new Date ( data . last_modified ) ;
2724
- if ( last_modified > that . last_modified ) {
2724
+ // We want to check last_modified (disk) > that.last_modified (our last save)
2725
+ // In some cases the filesystem reports an inconsistent time,
2726
+ // so we allow 0.5 seconds difference before complaining.
2727
+ if ( ( last_modified . getTime ( ) - that . last_modified . getTime ( ) ) > 500 ) { // 500 ms
2725
2728
console . warn ( "Last saving was done on `" + that . last_modified + "`(" + that . _last_modified + "), " +
2726
2729
"while the current file seem to have been saved on `" + data . last_modified + "`" ) ;
2727
2730
if ( that . _changed_on_disk_dialog !== null ) {
You can’t perform that action at this time.
0 commit comments