Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BFD2F10F0A for ; Tue, 6 Jan 2015 18:35:25 +0000 (UTC) Received: (qmail 65559 invoked by uid 500); 6 Jan 2015 18:35:26 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 65521 invoked by uid 500); 6 Jan 2015 18:35:26 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 65509 invoked by uid 99); 6 Jan 2015 18:35:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 18:35:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 946B3921D12; Tue, 6 Jan 2015 18:35:25 +0000 (UTC) From: omefire To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-lib pull request: CB-8226 'cordova platform add' : Look up... Content-Type: text/plain Message-Id: <20150106183525.946B3921D12@tyr.zones.apache.org> Date: Tue, 6 Jan 2015 18:35:25 +0000 (UTC) Github user omefire commented on the pull request: https://github.com/apache/cordova-lib/pull/140#issuecomment-68909782 Using url.parse introduces additional complexity. Especially, Windows paths are not going to be handled properly: the drive letter gets omitted after parsing. This leads to more confusion for the user. Linux/Unix absolute paths would be handled appropriately, but Windows's wouldn't. I suggest we remove the file:// prefix and not make config.xml contain urls for folder paths. Take the following examples: 1- url.parse('file://D:/Cordova/cordova-lib') => { protocol: 'file:', slashes: true, auth: null, host: 'd', port: null, hostname: 'd', hash: null, search: null, query: null, pathname: '/Cordova/cordova-lib', path: '/Cordova/cordova-lib', href: 'file://d/Cordova/cordova-lib' } 2- url.parse('file://D:\Cordova\cordova-lib') => { protocol: 'file:', slashes: true, auth: null, host: 'd', port: null, hostname: 'd', hash: null, search: null, query: null, pathname: '/:Cordovacordova-lib', path: '/:Cordovacordova-lib', href: 'file://d/:Cordovacordova-lib' } 3- url.parse('file:///Cordova/cordova-lib') => { protocol: 'file:', slashes: true, auth: null, host: '', port: null, hostname: '', hash: null, search: null, query: null, pathname: '/Cordova/cordova-lib', path: '/Cordova/cordova-lib', href: 'file:///Cordova/cordova-lib' } So, my suggestion is to only support plain filesystem paths for folders in config.xml. What do you think ? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org