eric6/WebBrowser/Sync/DirectorySyncHandler.py

changeset 7269
0c63ea7f94bd
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7268:a28338eaf694 7269:0c63ea7f94bd
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())

eric ide

mercurial