From a66ee5a8da6bb8c7f88d1c798b27a8c1f0148de3 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 23 Sep 2010 04:24:30 -0400 Subject: [PATCH] Only normalize() files that exist in File#joinPaths. --HG-- extra : rebase_source : 95956866421e607ed9232d905e2ceb462400e09e --- common/Makefile | 4 ++-- common/modules/storage.jsm | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/Makefile b/common/Makefile index 839af4c1..1dfa40db 100644 --- a/common/Makefile +++ b/common/Makefile @@ -82,7 +82,6 @@ release: $(XPI) $(RDF) dist: $(XPI) @echo DIST $(XPI) $(GOOGLE) set -e; \ - which $$(echo $(B64ENCODE) | $(AWK) '{print $1}') >/dev/null; \ \ proj=$$(echo -n $(NAME) | sed 's/\(.\).*/\1/' | tr a-z A-Z); \ proj="$$proj$$(echo $(NAME) | sed 's/.//')"; \ @@ -93,9 +92,10 @@ dist: $(XPI) IFS=,; for l in $$labels; do \ set -- "$$@" --form-string "label=$$l"; \ done; \ + auth=$$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | $(B64ENCODE)); \ $(CURL) "$$@" --form-string "summary=$$summary" \ -F "filename=@$(XPI)" \ - -H "Authorization: Basic $$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | $(B64ENCODE))" \ + -H "Authorization: Basic $$auth" \ -i "$(GOOGLE)" | sed -n '/^Location/{p;q;}' $(RDF): $(RDF_IN) Makefile diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index 00f6e1d4..4a06ce35 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -547,7 +547,8 @@ const File = Class("File", { try { // FIXME: should only expand env vars and normalise path separators path.appendRelativePath(this.expandPath(tail, true)); - path.normalize(); + if (path.exists()) + path.normalize(); } catch (e) { return { exists: function () false, __noSuchMethod__: function () { throw e; } };