1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-10 13:33:31 +02:00

Only normalize() files that exist in File#joinPaths.

--HG--
extra : rebase_source : 95956866421e607ed9232d905e2ceb462400e09e
This commit is contained in:
Kris Maglione
2010-09-23 04:24:30 -04:00
parent 4897e5cfad
commit a66ee5a8da
2 changed files with 4 additions and 3 deletions

View File

@@ -82,7 +82,6 @@ release: $(XPI) $(RDF)
dist: $(XPI) dist: $(XPI)
@echo DIST $(XPI) $(GOOGLE) @echo DIST $(XPI) $(GOOGLE)
set -e; \ set -e; \
which $$(echo $(B64ENCODE) | $(AWK) '{print $1}') >/dev/null; \
\ \
proj=$$(echo -n $(NAME) | sed 's/\(.\).*/\1/' | tr a-z A-Z); \ proj=$$(echo -n $(NAME) | sed 's/\(.\).*/\1/' | tr a-z A-Z); \
proj="$$proj$$(echo $(NAME) | sed 's/.//')"; \ proj="$$proj$$(echo $(NAME) | sed 's/.//')"; \
@@ -93,9 +92,10 @@ dist: $(XPI)
IFS=,; for l in $$labels; do \ IFS=,; for l in $$labels; do \
set -- "$$@" --form-string "label=$$l"; \ set -- "$$@" --form-string "label=$$l"; \
done; \ done; \
auth=$$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | $(B64ENCODE)); \
$(CURL) "$$@" --form-string "summary=$$summary" \ $(CURL) "$$@" --form-string "summary=$$summary" \
-F "filename=@$(XPI)" \ -F "filename=@$(XPI)" \
-H "Authorization: Basic $$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | $(B64ENCODE))" \ -H "Authorization: Basic $$auth" \
-i "$(GOOGLE)" | sed -n '/^Location/{p;q;}' -i "$(GOOGLE)" | sed -n '/^Location/{p;q;}'
$(RDF): $(RDF_IN) Makefile $(RDF): $(RDF_IN) Makefile

View File

@@ -547,7 +547,8 @@ const File = Class("File", {
try { try {
// FIXME: should only expand env vars and normalise path separators // FIXME: should only expand env vars and normalise path separators
path.appendRelativePath(this.expandPath(tail, true)); path.appendRelativePath(this.expandPath(tail, true));
path.normalize(); if (path.exists())
path.normalize();
} }
catch (e) { catch (e) {
return { exists: function () false, __noSuchMethod__: function () { throw e; } }; return { exists: function () false, __noSuchMethod__: function () { throw e; } };