Open JaegerJens opened 5 years ago
getParent() returns always the root directory instead of the parent directory.
getParent()
getParent() on directory /documents/upload/foobar/ should return /documents/upload/
/documents/upload/foobar/
/documents/upload/
getParent() return /
/
https://github.com/apache/cordova-plugin-file/blob/master/src/windows/FileProxy.js#L553
(new RegExp('/[^/]*/?$')).test(path)
is always true
UWP Windows 10 18362.449
cordova: 8.1.2 cordova-windows: 6.0.1 cordova-plugin-file: 5.00
Adding a leading ^to the pattern would fix the issue.
(new RegExp('^/[^/]*/?$')).test(path)
Is there a better place to post issues than here?
Bug Report
Problem
getParent()
returns always the root directory instead of the parent directory.What is expected to happen?
getParent()
on directory/documents/upload/foobar/
should return/documents/upload/
What does actually happen?
getParent()
return/
Information
Command or Code
https://github.com/apache/cordova-plugin-file/blob/master/src/windows/FileProxy.js#L553
is always true
Environment, Platform, Device
UWP Windows 10 18362.449
Version information
cordova: 8.1.2 cordova-windows: 6.0.1 cordova-plugin-file: 5.00
Checklist