This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253156 - There should be a way to determine file path separator
Summary: There should be a way to determine file path separator
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks: 248653
  Show dependency tree
 
Reported: 2015-06-24 11:41 UTC by Vladimir Kvashin
Modified: 2015-07-01 01:18 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The proposed fix (1.70 KB, patch)
2015-06-24 11:45 UTC, Vladimir Kvashin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2015-06-24 11:41:39 UTC
File path separator ("\" on Windows and "/" in non-Windows world) is in fact file-system dependent.

When on Windows, File.separator is "\", while in many file systems (jar, system, remote) it's natural to use "/".

In the case of remote file system it leads to usability issues like issue 248653.

So I propose to create an API that allows to get this file-system depended separator
Comment 1 Vladimir Kvashin 2015-06-24 11:43:20 UTC
I would propose to use attributes, like we did with line separators a while ago.
Comment 2 Vladimir Kvashin 2015-06-24 11:45:16 UTC
Created attachment 154370 [details]
The proposed fix
Comment 3 Jaroslav Havlin 2015-06-25 13:39:43 UTC
The patch seems OK to me.
Thank you.
Comment 4 Vladimir Kvashin 2015-06-25 15:35:40 UTC
(In reply to Jaroslav Havlin from comment #3)
Thank you!
I'm going to integrate it shortly.
Comment 5 Vladimir Kvashin 2015-06-26 08:44:37 UTC
The fix is pushed into cnd-main
http://hg.netbeans.org/cnd-main/rev/3de333a33a3e
Comment 6 Quality Engineering 2015-07-01 01:18:28 UTC
Integrated into 'main-silver', will be available in build *201507010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3de333a33a3e
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fix for #253156 - There should be a way to determine file path separator