diff --git a/cs654/proj1/FileServer.java b/cs654/proj1/FileServer.java index 1378e8e..5743f18 100644 --- a/cs654/proj1/FileServer.java +++ b/cs654/proj1/FileServer.java @@ -8,14 +8,11 @@ public class FileServer implements Runnable private int m_port; private String m_rootPath; private ServerSocket m_serverSocket; - private char m_pathSeparator = '/'; public FileServer(int port, String rootPath) { m_port = port; m_rootPath = rootPath; - if (rootPath.indexOf('\\') >= 0) - m_pathSeparator = '\\'; } public void run() @@ -64,7 +61,7 @@ public class FileServer implements Runnable /* read the file name the client is requesting */ String fileName = br.readLine(); - String absFileName = m_rootPath + m_pathSeparator + fileName; + String absFileName = m_rootPath + File.separator + fileName; FileInputStream fis = null; try {