Skip to content
Browse files

Code clean-up

  • Loading branch information...
1 parent 5a4e455 commit ee76ed0365d14b4163e80831c388dce1b5a02fbc @slothspot committed
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/name/dmitrym/syncspec/Worker.scala
View
9 src/name/dmitrym/syncspec/Worker.scala
@@ -66,12 +66,9 @@ object Worker {
if (!f.isDirectory) filesList += new SyncEntry(parent, f)
else listDir(parent, f).foreach(f => filesList += f)
)
- filesList.result.sortWith(sortByNameAsc)
+ filesList.result().sortWith(sortByNameAsc)
}
- @deprecated("Deprecated by SyncEntry overloaded constructor")
- private def file2SyncEntry(parent: File, f: File) = new SyncEntry(parent.getCanonicalPath, f.getCanonicalPath.substring(parent.getCanonicalPath.length + 1), f.length, f.lastModified)
-
private def sortByNameAsc(a: SyncEntry, b: SyncEntry) = a.getName.compareToIgnoreCase(b.getName) < 0
private def sortByNameDsc(a: SyncEntry, b: SyncEntry) = a.getName.compareToIgnoreCase(b.getName) > 0
@@ -134,8 +131,8 @@ object Worker {
fos.write(buf, 0, amount)
amount = fis.read(buf, 0, buf.size)
}
- fis.close
- fos.close
+ fis.close()
+ fos.close()
dF.setLastModified(e.getLastModified)
if (deleteSource) {
sF.delete

0 comments on commit ee76ed0

Please sign in to comment.
Something went wrong with that request. Please try again.