From 0010b521776ecaa3527f27f71582d7d206c4cf3e Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 8 Mar 2008 23:06:35 +0000 Subject: [PATCH] use File.separator instead of figuring it out ourselves git-svn-id: svn://anubis/gvsu@42 45c1a28c-8058-47b2-ae61-ca45b979098e --- cs654/proj1/FileServer.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 {