[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] [svnClientAdapter] strip trailing newline from cmdline propget output

From: Daniel L. Rall <dlr_at_finemaltcoding.com>
Date: 2005-06-17 21:40:35 CEST

This patch fixes a bug in parsing of the command-line binary's propget
output, where failure to strip a trailing newline was resulting in
incorrect reporting of a property's value.

[[[
* src/main/org/tigris/subversion/svnclientadapter/commandline/CmdLineClientAdapter.java
  (propertyGet): Strip trailing newline from cmdline propget output,
   fixing a bug in reporting of a property's value.
]]]

--- src/main/org/tigris/subversion/svnclientadapter/commandline/CmdLineClientAdapter.java (revision 1367)
+++ src/main/org/tigris/subversion/svnclientadapter/commandline/CmdLineClientAdapter.java (working copy)
@@ -691,7 +691,7 @@
                        String pathString = toString(path);
                        InputStream valueAndData = _cmd.propget(toString(path), propertyName);

- byte[] bytes = streamToByteArray(valueAndData, false);
+ byte[] bytes = streamToByteArray(valueAndData, true);
             if (bytes.length == 0) {
                 return null; // the property does not exist
             }
Received on Sat Jun 18 05:40:35 2005

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.