-/* Cumulus: Smart Filesystem Backup to Dumb Servers
- *
- * Copyright (C) 2007 The Regents of the University of California
- * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+/* Cumulus: Efficient Filesystem Backup to the Cloud
+ * Copyright (C) 2007-2008 The Cumulus Developers
+ * See the AUTHORS file for a list of contributors.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if (range_valid) {
char buf[64];
- if (range_exact) {
- sprintf(buf, "[=%zu]", range_length);
- } else if (type == REF_ZERO) {
+ if (range_exact || type == REF_ZERO) {
sprintf(buf, "[%zu]", range_length);
} else {
sprintf(buf, "[%zu+%zu]", range_start, range_length);
if (*t == '[') {
t++;
+ // An equal sign was once used for a length assertion but is now
+ // deprecated. Skip it if present, and mark that we are expecting a
+ // length-only reference.
if (*t == '=') {
range_exact = true;
t++;
if (*t == ']') {
string val(s, t - s);
range2 = atoll(val.c_str());
+ range_exact = true;
} else {
if (*t != '+')
return ObjectReference();