continuity icon indicating copy to clipboard operation
continuity copied to clipboard

standardize absolute path spec

Open AkihiroSuda opened this issue 7 years ago • 7 comments

https://github.com/containerd/continuity/pull/82#issuecomment-308214355

  • should we use / separator on both Unix and Windows?
  • "absolute path" does not contain drive letter (C:), right?

AkihiroSuda avatar Jun 13 '17 18:06 AkihiroSuda

ptal @dmcgowan @stevvooe

AkihiroSuda avatar Jul 19 '17 05:07 AkihiroSuda

@AkihiroSuda I am not sure. What will work for windows?

stevvooe avatar Jul 19 '17 21:07 stevvooe

So, a manifest will contain paths like /Program Files/Foo/Bar. When it is applied on C:, the path will be treated as C:\Program Files\Foo\Bar

AkihiroSuda avatar Jul 20 '17 02:07 AkihiroSuda

For manifests, they usually target a single platform, so having OS specific paths seems fine, which means we can avoid the conversion.

stevvooe avatar Jul 20 '17 21:07 stevvooe

@AkihiroSuda do you know if \Program Files\Foo\Bar is considered a valid absolute path on Windows?

The advantage I see of using / for both Windows and Linux is that some content may not target a single platform, making it the responsibility of the unpacker to correctly interpret and convert the separator. As soon as the unpacker is doing some interpretation, it is allowing multiple forms for the same content which is against the design goals of continuity.

dmcgowan avatar Jul 21 '17 15:07 dmcgowan

@tonistiigi PTAL

I think we should probably standardize on unix-style paths. In general, the manifests should be relocatable.

stevvooe avatar Jul 29 '17 00:07 stevvooe

@AkihiroSuda Are we good on this? What are the next steps?

stevvooe avatar Feb 02 '18 22:02 stevvooe