[gtk-doc] rebase: fix directory scanning
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] rebase: fix directory scanning
- Date: Thu, 13 Apr 2017 20:25:59 +0000 (UTC)
commit b88b6cf163674adacfdac84195b03056d564f895
Author: Stefan Sauer <ensonic users sf net>
Date: Thu Apr 13 22:22:45 2017 +0200
rebase: fix directory scanning
We need to use the full path for isdir() checks.
gtkdoc/rebase.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc/rebase.py b/gtkdoc/rebase.py
index ed628cb..0ab0977 100755
--- a/gtkdoc/rebase.py
+++ b/gtkdoc/rebase.py
@@ -94,8 +94,9 @@ def ScanDirectory(dir, options):
have_index = False
for entry in os.listdir(dir):
- if os.path.isdir(entry):
- subdirs.push_back(entry)
+ full_entry = os.path.join(dir, entry)
+ if os.path.isdir(full_entry):
+ subdirs.append(full_entry)
continue
if entry.endswith('.devhelp2'):
@@ -115,7 +116,7 @@ def ScanDirectory(dir, options):
print(''' Please fix https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/77138 . For now run:
gunzip %s/%s
''' % (dir, entry))
- elif entry.endswith('.devhelp2.gz') and not os.path.exists(os.path.join(dir, entry, 'devhelp2')):
+ elif entry.endswith('.devhelp2.gz') and not os.path.exists(full_entry[:-3]):
# debian/ubuntu started to compress this as *devhelp2.gz :/
print('''Please fix https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/1466210 . For now run:
gunzip %d/%s
@@ -127,7 +128,7 @@ gunzip %d/%s
# Now recursively scan the subdirectories.
for subdir in subdirs:
- ScanDirectory(os.path.join(dir, subdir), options)
+ ScanDirectory(subdir, options)
def ReadDevhelp(dir, file):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]