148 @param type_ type of the synchronization event (string one |
148 @param type_ type of the synchronization event (string one |
149 of "bookmarks", "history", "passwords", "useragents" or |
149 of "bookmarks", "history", "passwords", "useragents" or |
150 "speeddial") |
150 "speeddial") |
151 @param fileName name of the file to be synchronized (string) |
151 @param fileName name of the file to be synchronized (string) |
152 """ |
152 """ |
153 if not self.__forceUpload and \ |
153 if ( |
154 os.path.exists(os.path.join( |
154 not self.__forceUpload and |
155 Preferences.getWebBrowser("SyncDirectoryPath"), |
155 os.path.exists(os.path.join( |
156 self._remoteFiles[type_])) and \ |
156 Preferences.getWebBrowser("SyncDirectoryPath"), |
157 QFileInfo(fileName).lastModified() <= QFileInfo( |
157 self._remoteFiles[type_])) and |
158 os.path.join( |
158 QFileInfo(fileName).lastModified() <= QFileInfo( |
159 Preferences.getWebBrowser("SyncDirectoryPath"), |
159 os.path.join(Preferences.getWebBrowser("SyncDirectoryPath"), |
160 self._remoteFiles[type_])).lastModified(): |
160 self._remoteFiles[type_])).lastModified() |
|
161 ): |
161 self.__downloadFile( |
162 self.__downloadFile( |
162 type_, fileName, |
163 type_, fileName, |
163 QFileInfo(os.path.join( |
164 QFileInfo(os.path.join( |
164 Preferences.getWebBrowser("SyncDirectoryPath"), |
165 Preferences.getWebBrowser("SyncDirectoryPath"), |
165 self._remoteFiles[type_])).lastModified().toTime_t()) |
166 self._remoteFiles[type_])).lastModified().toTime_t()) |