Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 7e6c4dd

Browse files
committed
Fix file system actor and update Readme
1 parent 29a8eb2 commit 7e6c4dd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ Please see the wiki to learn how to code new [platform sources](https://github.c
3232

3333
Chat Overflow releases are not yet available. ETA Q2 2019.
3434

35+
### Discord
36+
37+
The perfect place if you need help with the framework, found a bug or want to share your own plugin:
38+
39+
[![discord](https://discordapp.com/api/guilds/577412066994946060/widget.png?style=banner2)](https://discord.gg/p2HDsme)
40+
3541
### About Code Overflow
3642

3743
Code Overflow started as a coding-livestream project by three computer science students @ [KIT, Karlsruhe](http://www.kit.edu/) and is headed by [skate702](http://skate702.de).

src/main/scala/org/codeoverflow/chatoverflow/connector/actor/FileSystemActor.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class FileSystemActor extends Actor {
3636
}
3737
case LoadBinaryFile(pathInResources) =>
3838
try {
39-
sender ! Some(Files.readAllBytes(new File(s"$dataFilePath${fixPath(pathInResources)}").toPath))
39+
sender ! Files.readAllBytes(new File(s"$dataFilePath${fixPath(pathInResources)}").toPath)
4040
} catch {
41-
case _: Exception => None
41+
case _: Exception => Array[Byte]()
4242
}
4343
case SaveFile(pathInResources, content) =>
4444
try {
@@ -65,7 +65,7 @@ class FileSystemActor extends Actor {
6565
}
6666

6767
private def fixPath(path: String): String = {
68-
val fixedPath = Paths.get(File.pathSeparator, path).normalize()
68+
val fixedPath = Paths.get(File.separator, path).normalize()
6969
fixedPath.toString
7070
}
7171
}

0 commit comments

Comments
 (0)