]> git.pld-linux.org Git - packages/rpm.git/commitdiff
do not use basename, it resolves to xpg_basename which modifies it's argument
authorElan Ruusamäe <glen@delfi.ee>
Sun, 28 Apr 2013 20:53:38 +0000 (23:53 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 28 Apr 2013 20:53:38 +0000 (23:53 +0300)
nodejs-autodeps.patch

index 1fc90e4cdefd2d66266a57ca3f55890888f74b2f..d88a1127c56716f97b2fa804f15401d77a9459c7 100644 (file)
  #if defined(RPM_VENDOR_MANDRIVA)
      { rpmfcSYMLINK,   RPMFC_SYMLINK },
  #endif
-@@ -1096,6 +1107,7 @@
-     char * se;
-     rpmds ds;
-     const char * fn;
-+    char * bn;
-     const char * N;
-     const char * EVR;
-     evrFlags Flags;
-@@ -1152,6 +1164,12 @@
+@@ -1152,6 +1164,11 @@
                    fn += 2;
                if (!strncmp(fn, "/python", sizeof("/python")-1))
                    fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
 +              else if (!strncmp(fn, "/node", sizeof("/node")-1) || !strncmp(fn, "/node_modules", sizeof("/node_modules")-1)) {
 +                  fc->fcolor->vals[fc->ix] |= RPMFC_NODEJS;
-+                  bn = basename(fn);
-+                  if (!strcmp(bn, "package.json")) {
++                  if (!strcmp(fn, "/package.json")) {
 +                      fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
 +                  }
                else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
This page took 0.377473 seconds and 4 git commands to generate.