Revision: 4315
http://skim-app.svn.sourceforge.net/skim-app/?rev=4315&view=rev
Author: hofman
Date: 2008-07-28 11:32:33 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
Use correct separator for fragment numbers in extended attributes
Modified Paths:
--------------
trunk/SkimNotes/SKNExtendedAttributeManager.m
Modified: trunk/SkimNotes/SKNExtendedAttributeManager.m
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.m 2008-07-28 11:10:33 UTC
(rev 4314)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.m 2008-07-28 11:32:33 UTC
(rev 4315)
@@ -36,6 +36,7 @@
#define UNIQUE_VALUE [[NSProcessInfo processInfo]
globallyUniqueString]
#define PREFIX @"net_sourceforge_skim-app"
+#define FRAGMENT_NAME_SEPARATOR @"-"
#define NAME_SEPARATOR @"_"
#define UNIQUE_KEY_SUFFIX @"_unique_key"
#define WRAPPER_KEY_SUFFIX @"_has_wrapper"
@@ -257,7 +258,7 @@
// reassemble the original data object
for (i = 0; success && i < numberOfFragments; i++) {
NSError *tmpError = nil;
- name = [NSString stringWithFormat:@"[EMAIL PROTECTED]@%lu",
uniqueValue, NAME_SEPARATOR, (long)i];
+ name = [NSString stringWithFormat:@"[EMAIL PROTECTED]@%lu",
uniqueValue, FRAGMENT_NAME_SEPARATOR, (long)i];
subdata = [self extendedAttributeNamed:name atPath:path
traverseLink:follow error:&tmpError];
if (nil == subdata) {
NSLog(@"failed to find subattribute %@ of %lu for attribute
named [EMAIL PROTECTED] %@", name, (long)numberOfFragments, attr, [tmpError
localizedDescription]);
@@ -343,7 +344,7 @@
const char *valuePtr = [value bytes];
for (j = 0; success && j < numberOfFragments; j++) {
- name = [[NSString alloc] initWithFormat:@"[EMAIL PROTECTED]@%lu",
uniqueValue, NAME_SEPARATOR, (long)j];
+ name = [[NSString alloc] initWithFormat:@"[EMAIL PROTECTED]@%lu",
uniqueValue, FRAGMENT_NAME_SEPARATOR, (long)j];
char *subdataPtr = (char *)&valuePtr[j * MAX_XATTR_LENGTH];
size_t subdataLen = j == numberOfFragments - 1 ? ([value length] -
j * MAX_XATTR_LENGTH) : MAX_XATTR_LENGTH;
@@ -432,7 +433,7 @@
// remove the sub attributes
for (i = 0; i < numberOfFragments; i++) {
- name = [NSString stringWithFormat:@"[EMAIL
PROTECTED]@%lu", uniqueValue, NAME_SEPARATOR, (long)i];
+ name = [NSString stringWithFormat:@"[EMAIL
PROTECTED]@%lu", uniqueValue, FRAGMENT_NAME_SEPARATOR, (long)i];
const char *subAttrName = [name UTF8String];
status = removexattr(fsPath, subAttrName, xopts);
if (status == -1) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit