driver/docker: support unix destination mount path in windows

This reverts commit a6c96eade5.
This commit is contained in:
Ilya Guterman
2019-08-01 19:54:08 +03:00
parent 3fd0c7220c
commit 7beee87618

View File

@@ -33,7 +33,7 @@ const (
// rxHostDir is the first option of a source
rxHostDir = `(?:\\\\\?\\)?[a-z]:[\\/](?:[^\\/:*?"<>|\r\n]+[\\/]?)*`
// rxName is the second option of a source
rxName = `[^\\/:*?"<>|\r\n]+`
rxName = `[^\\/:*?"<>|\r\n]+\/?.*`
// RXReservedNames are reserved names not possible on Windows
rxReservedNames = `(con)|(prn)|(nul)|(aux)|(com[1-9])|(lpt[1-9])`
@@ -58,7 +58,7 @@ const (
// - And can be optional
// rxDestination is the regex expression for the mount destination
rxDestination = `(?P<destination>((?:\\\\\?\\)?([a-z]):((?:[\\/][^\\/:*?"<>\r\n]+)*[\\/]?))|(` + rxPipe + `))`
rxDestination = `(?P<destination>((?:\\\\\?\\)?([a-z]):((?:[\\/][^\\/:*?"<>\r\n]+)*[\\/]?))|(` + rxPipe + `)|([/].*))`
// Destination (aka container path):
// - Variation on hostdir but can be a drive followed by colon as well