Code Duplication    Length = 6-6 lines in 2 locations

lib/backend.php 1 location

@@ 303-308 (lines=6) @@
300
							$requery = true;
301
						}
302
						// We moved the rename down here to overcome the OC issue
303
						if ($this->endsWith($tmpfile, ".html")) {
304
							$tmpfile = substr($tmpfile, 0, -1);
305
							if (!Filesystem::file_exists($FOLDER . "/" . $tmpfile)) {
306
								Filesystem::rename($FOLDER . "/" . $file, $FOLDER . "/" . $tmpfile);
307
							}
308
						}
309
					}
310
				}
311
			}

lib/Service/OwnNoteService.php 1 location

@@ 369-374 (lines=6) @@
366
							$requery = true;
367
						}
368
						// We moved the rename down here to overcome the OC issue
369
						if ($this->utils->endsWith($tmpfile, ".html")) {
370
							$tmpfile = substr($tmpfile, 0, -1);
371
							if (!Filesystem::file_exists($FOLDER . "/" . $tmpfile)) {
372
								Filesystem::rename($FOLDER . "/" . $file, $FOLDER . "/" . $tmpfile);
373
							}
374
						}
375
					}
376
				}
377
			}