Changeset da4f72c38ed31111d447c64efd78cf500beabf73
- Timestamp:
- 06/07/08 00:13:03 (7 months ago)
- Author:
- Sebastien Martini <ookoi@…>
- Parents:
- c36bdd432b56f0d9a329c918c0a3a0110d59f5c4
- Children:
- 6253a716008486c1864f4416916bb2fe1387498c
- git-committer:
- Sebastien Martini <ookoi@mars.(none)> / 2008-06-07T00:13:03Z+0200
- Message:
-
* Fix segmentation fault reported by dougfort@…, but not
sure if the way it is fixed doesn't introduce limitations on encodings.
* event.pathname represents now an absolute path.
* Fix display of events.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rc36bdd4
|
rda4f72c
|
|
| 56 | 56 | __author__ = "seb@dbzteam.org (Sebastien Martini)" |
| 57 | 57 | |
| 58 | | __version__ = "0.8.0q" |
| | 58 | __version__ = "0.8.0r" |
| 59 | 59 | |
| 60 | 60 | __metaclass__ = type # Use new-style classes by default |
| … |
… |
|
| 363 | 363 | # all 'normal' events |
| 364 | 364 | ALL_EVENTS = reduce(lambda x, y: x | y, EventsCodes.OP_FLAGS.itervalues()) |
| | 365 | EventsCodes.ALL_FLAGS['ALL_EVENTS'] = ALL_EVENTS |
| | 366 | EventsCodes.ALL_VALUES[ALL_EVENTS] = 'ALL_EVENTS' |
| 365 | 367 | |
| 366 | 368 | |
| … |
… |
|
| 391 | 393 | elif isinstance(value, str) and not value: |
| 392 | 394 | value ="''" |
| 393 | | if attr == 'pathname' and value and self.dir: |
| 394 | | value += os.sep |
| 395 | 395 | s += ' %s%s%s' % (color_theme.field_name(attr), |
| 396 | 396 | color_theme.punct('='), |
| … |
… |
|
| 462 | 462 | try: |
| 463 | 463 | if self.name: |
| 464 | | self.pathname = os.path.join(self.path, self.name) |
| | 464 | self.pathname = os.path.abspath(os.path.join(self.path, |
| | 465 | self.name)) |
| 465 | 466 | else: |
| 466 | | self.pathname = self.path |
| | 467 | self.pathname = os.path.abspath(self.path) |
| 467 | 468 | except AttributeError: |
| 468 | 469 | pass |
| … |
… |
|
| 1265 | 1266 | watch manager dictionary. Return the wd value. |
| 1266 | 1267 | """ |
| 1267 | | wd_ = LIBC.inotify_add_watch(self._fd, path, mask) |
| | 1268 | wd_ = LIBC.inotify_add_watch(self._fd, |
| | 1269 | ctypes.create_string_buffer(path), |
| | 1270 | mask) |
| 1268 | 1271 | if wd_ < 0: |
| 1269 | 1272 | return wd_ |
| … |
… |
|
| 1409 | 1412 | |
| 1410 | 1413 | if mask: |
| 1411 | | wd_ = LIBC.inotify_add_watch(self._fd, apath, mask) |
| | 1414 | addw = LIBC.inotify_add_watch |
| | 1415 | wd_ = addw(self._fd, |
| | 1416 | ctypes.create_string_buffer(apath), |
| | 1417 | mask) |
| 1412 | 1418 | if wd_ < 0: |
| 1413 | 1419 | ret_[awd] = False |