Skip to content

[SR-794] NSBundle.pathForResource returns nil on Linux #4520

Closed
@swift-ci

Description

@swift-ci
Previous ID SR-794
Radar None
Original Reporter vadim (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

Swift version 3.0-dev (LLVM a7663bb722, Clang 4ca3c7fa28, Swift 1c2f40e246)
Target: x86_64-unknown-linux-gnu
Ubuntu 4.2.0-25-generic #30-Ubuntu SMP Mon Jan 18 12:31:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=he_IL.UTF-8
LC_TIME=he_IL.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=he_IL.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=he_IL.UTF-8
LC_NAME=he_IL.UTF-8
LC_ADDRESS=he_IL.UTF-8
LC_TELEPHONE=he_IL.UTF-8
LC_MEASUREMENT=he_IL.UTF-8
LC_IDENTIFICATION=he_IL.UTF-8
LC_ALL=

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee seabaylea (JIRA)
Priority Medium

md5: 8e259548fd47cb9dab11e78e7d3fbfe4

Issue Description:

NSBundle.pathForResource returns nil on Linux - see attached example.
The output on Linux:
bundle.resourcePath = Optional("/tmp/pathForResourceDefect")
path = nil

The output on OS X:
bundle.resourcePath = Optional("/private/tmp/pathForResourceDefect")
path = Optional("/private/tmp/pathForResourceDefect//Sources/main.swift")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions