1 // 2 // aegis - project change supervisor 3 // Copyright (C) 2006, 2008, 2011, 2012 Peter Miller 4 // 5 // This program is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program. If not, see 17 // <http://www.gnu.org/licenses/>. 18 // 19 20 #include <common/error.h> 21 #include <libaegis/lock.h> 22 #include <libaegis/project.h> 23 24 25 void lock_sync()26project::lock_sync() 27 { 28 if (parent) 29 this_is_a_bug(); 30 long n = ::lock_magic(); 31 if (lock_magic == n) 32 return; 33 lock_magic = n; 34 35 if (pstate_data && !is_a_new_file) 36 { 37 pstate_type.free(pstate_data); 38 pstate_data = 0; 39 } 40 file_list_invalidate(); 41 } 42 43 44 // vim: set ts=8 sw=4 et : 45