Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DF0D10956 for ; Mon, 17 Feb 2014 23:08:23 +0000 (UTC) Received: (qmail 42380 invoked by uid 500); 17 Feb 2014 23:08:20 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 42331 invoked by uid 500); 17 Feb 2014 23:08:20 -0000 Mailing-List: contact issues-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 issues@cordova.apache.org Received: (qmail 42317 invoked by uid 99); 17 Feb 2014 23:08:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Feb 2014 23:08:19 +0000 Date: Mon, 17 Feb 2014 23:08:19 +0000 (UTC) From: "Stepan Riha (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CB-6053) DirectoryEntry.getFile() fails for relative paths MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Stepan Riha created CB-6053: ------------------------------- Summary: DirectoryEntry.getFile() fails for relative paths Key: CB-6053 URL: https://issues.apache.org/jira/browse/CB-6053 Project: Apache Cordova Issue Type: Bug Components: Plugin File, Windows 8 Affects Versions: 3.3.0 Environment: Windows 8 Reporter: Stepan Riha Assignee: Jesse MacFadyen According to the spec, DirectoryEntry.getFile() is supposed to support specifying a relative path. However, specifying a relative path (and option.create=false) will cause the method to fail with {{FileError.ENCODING_ERR}}. The culprit seems to be following code in FileProxy.getFile() - it tests for invalid *file _name_* characters but should really be testing invalid *file _path_* characters (i.e. it should allow {{/}}). {code:title=FileProxy.js} if (/\?|\\|\*|\||\"|<|>|\:|\//g.test(path)) { fail && fail(FileError.ENCODING_ERR); return; } {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)