/[classpath]/inetlib/source/gnu/inet/ftp/FTPURLConnection.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/ftp/FTPURLConnection.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by dog, Thu Nov 25 22:15:05 2004 UTC revision 1.10 by dog, Sat May 28 13:30:37 2005 UTC
# Line 167  public class FTPURLConnection Line 167  public class FTPURLConnection
167          connect();          connect();
168        }        }
169      String path = url.getPath();      String path = url.getPath();
170        if (path.startsWith("/"))
171          {
172            path = path.substring(1);
173          }
174      String filename = null;      String filename = null;
175      int lsi = path.lastIndexOf('/');      int lsi = path.lastIndexOf('/');
176      if (lsi != -1)      if (lsi != -1)
# Line 198  public class FTPURLConnection Line 202  public class FTPURLConnection
202        {        {
203          connect();          connect();
204        }        }
205      String dir = url.getPath();      String path = url.getPath();
206      String filename = url.getFile();      if (path.startsWith("/"))
     if (!connection.changeWorkingDirectory(dir))  
207        {        {
208          throw new FileNotFoundException(dir);          path = path.substring(1);
209        }        }
210      if (filename != null)      String filename = null;
211        int lsi = path.lastIndexOf('/');
212        if (lsi != -1)
213          {
214            filename = path.substring(lsi + 1);
215            path = path.substring(0, lsi);
216            if (!connection.changeWorkingDirectory(path))
217              {
218                throw new FileNotFoundException(path);
219              }
220          }
221        if (filename != null && filename.length() > 0)
222        {        {
223          return this.new ClosingOutputStream(connection.store(filename));          return this.new ClosingOutputStream(connection.store(filename));
224        }        }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26