~ubuntu-branches/ubuntu/trusty/xscreensaver/trusty

« back to all changes in this revision

Viewing changes to OSX/PrefsReader.m

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-11-30 13:33:13 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091130133313-3b5nz2e7hvbb8h3l
Tags: 5.10-3ubuntu1
* Merge with Debian unstable, remaining changes: (LP: #489062)
  - debian/control: add Build-Depends on ubuntu-artwork
  - debian/rules: use /usr/share/backgrounds
  - debian/control: Move xli | xloadimage recommends to suggests
  - debian/split-hacks.config: Use different set of default hacks to Debian
  - debian/source_xscreensaver.py: Add apport hook
  - debian/patches/53_XScreenSaver.ad.in.patch: Use Ubuntu branding

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* xscreensaver, Copyright (c) 2006-2008 Jamie Zawinski <jwz@jwz.org>
 
1
/* xscreensaver, Copyright (c) 2006-2009 Jamie Zawinski <jwz@jwz.org>
2
2
 *
3
3
 * Permission to use, copy, modify, distribute, and sell this software and its
4
4
 * documentation for any purpose is hereby granted without fee, provided that
210
210
    strcpy (result, result+1);
211
211
  }
212
212
 
 
213
  // Kludge: assume that any string that begins with "~" and has a "/"
 
214
  // anywhere in it should be expanded as if it is a pathname.
 
215
  if (result[0] == '~' && strchr (result, '/')) {
 
216
    os = [NSString stringWithCString:result encoding:NSUTF8StringEncoding];
 
217
    free (result);
 
218
    result = strdup ([[os stringByExpandingTildeInPath]
 
219
                       cStringUsingEncoding:NSUTF8StringEncoding]);
 
220
  }
 
221
 
213
222
  return result;
214
223
}
215
224