locked
fileQueryResults.getFilesAsync() does not work with mapped network drives

    Question

  • I have a mapped network drive/folder as Z:\ and can pick folders in there using the FolderPicker. Yet, when I want to create a file query on this folder the call to fileQueryResults.getFilesAsync(); never calls the complete, error or progress handler.

    What's going on here?

    folderPicker.pickSingleFolderAsync().then(function(folder) {
            var fileQueryResults, queryOptions;
            if (!folder) {
              return complete({
                size: 0
              });
            }
            queryOptions = new Windows.Storage.Search.QueryOptions();
            queryOptions.folderDepth = Windows.Storage.Search.FolderDepth.deep;
            queryOptions.userSearchFilter = SUPPORTED_FILE_EXTENSIONS.map(function(ext) {
              return "System.FileName:~\"*" + ext + "\"";
            }).join(" OR ");
            fileQueryResults = folder.createFileQueryWithOptions(queryOptions);
            return fileQueryResults.getFilesAsync();
          }).then(function(files) {
            if (files && files.length > 0) {
    }...

    Monday, November 19, 2012 5:42 PM