zip_extract doesn't work if file extension isn't "zip"

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

zip_extract doesn't work if file extension isn't "zip"

Post by aliteralmind »

Sublime Text stores its "packages" (downloadable extensions) as "PackageName.sublime-package", but it's just a zip file--you change "sublime-package" to "zip" if you want.

The zip_extract function doesn't work unless you change the extension to zip.
Windows 8.1, 64-bit

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: zip_extract doesn't work if file extension isn't "zip"

Post by highend »

I hardly call this a bug... Windows relies on extensions unlike other OS like Unix / Linux. Write a script that temporarily renames the file, extract it and rename it back.
One of my scripts helped you out? Please donate via Paypal

aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

Re: zip_extract doesn't work if file extension isn't "zip"

Post by aliteralmind »

I disagree.

If the file is named "PackageName.zip", then you have to pass in "PackageName.zip". "PackageName" does not work.

This pretty strongly implies that passing in another extension should also work, as long as it's a zip file of course! "PackageName.sublime-package" is a just zip file in disguise.
Windows 8.1, 64-bit

zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

Re: zip_extract doesn't work if file extension isn't "zip"

Post by zer0 »

By the same token, I would be curious to ask author(s) of that product: if it's in effect just a zip file, why not have it with its proper extension, why disguise it? If their answer would be "because that's how our product works", the same is true of XY ;)
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: zip_extract doesn't work if file extension isn't "zip"

Post by highend »

Don't expect an answer from the programmer of ST. The product is merely dead...
One of my scripts helped you out? Please donate via Paypal

Filehero
Posts: 2734
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: zip_extract doesn't work if file extension isn't "zip"

Post by Filehero »

highend wrote:Don't expect an answer from the programmer of ST. The product is merely dead...
:shock: They/he took about 60$ per license, right?

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: zip_extract doesn't work if file extension isn't "zip"

Post by highend »

70^^

Don't know what to use next. Atom is so slow (and it has some nasty bugs in Windows).
Brackets looks nice but it's imho too much tailored for web development.

NeoVim would be cool but no Windows version in sight *sigh*

Getting off topic here xD
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: zip_extract doesn't work if file extension isn't "zip"

Post by bdeshi »

I believe (honest!) ST isn't quite dead yet. The latest ST3 dev build was released on October.
I guess our perspective on development speed was skewered skewed by somebody :whistle: .

Getting off topic here xD :P
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

Re: zip_extract doesn't work if file extension isn't "zip"

Post by aliteralmind »

highend wrote:Don't expect an answer from the programmer of ST. The product is merely dead...
Well, I don't think it's dead, as a new beta was released in October. But even if it were, it's still a good enough product to carry me through many more years of coding.

As far as why they name it *.sublime-package instead of *.zip, I don't know why it should matter. It's a zip file. It has a different name.
Windows 8.1, 64-bit

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: zip_extract doesn't work if file extension isn't "zip"

Post by highend »

I don't know why it should matter
Because it doesn't use the .zip extension *sigh* and btw, a file name like "PackageName.zip" IS NOT THE SAME AS "PackageName".

The last beta release was nothing more than a placebo (imho)... Pretend that you're actively maintaining a product, get some income of new users. Compare it to AdMuncher. He is promising things for many many years (v5 is coming out soon! https support? yeah, coming!) and in reality...

Jon has been (more than a year ago but still) a _very_ active developer. Bugfixes & new features every few weeks. There are a lot of outstanding bugs and there aren't fixes for them (any more) since mostly a year.

karisublime is the "official voice" for Jon in the forum. 1,5 years there, 7 posts, her last one is 4 months old. There isn't anything to say about the (which?) future of ST...

Jon would have been better off selling ST as a whole at the time he lost interest in developing it any further :/
One of my scripts helped you out? Please donate via Paypal

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: zip_extract doesn't work if file extension isn't "zip"

Post by Enternal »

Lol! I think aliteralmind has been too influenced by the way Linux does things. On Windows at least (and Macintosh even though it's a derivative of BSD), extensions have a much higher importance so if you want to know what type of a file it is, it MUST have that extension. Of course, you could do things like Sublime Text and just change the extension to something else but then not many would know it's simply a zip file. I did not even know that even though I did write a script before that encrypts a keyfile and changed the extension from 7z (using 7-zip's built-in AES encryption) to DAT just to "hide" it. That's one reason why I wrote a little script to incorporate TrID because some company really like to "disguise" their files and it's annoying at times.

Otherwise, what if we name all jpeg image files as DC1352323.DAT. With your argument that "well, it's just a jpeg file so it doesn't matter", have fun with making photo software open it up. Those software are expecting a jpeg for a JPEG file. Not a dat for a JPEG file. :lol:

With that being said, I understand why Sublime Text does that. It's simply to let people know that this particular zip file is used for Sublime Text. The same thing can be said about Android's apk, Firefox's xpi, and others. That's all it is. HOWEVER, don't expect other programs to know that because generally, you don't need to open these files so what other programs expect from a zip file, it must have an extension of zip.

aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

Re: zip_extract doesn't work if file extension isn't "zip"

Post by aliteralmind »

Ah, "Bah Humbug!" ;)
Windows 8.1, 64-bit

mwb1100
Posts: 213
Joined: 19 May 2007 06:20

Re: zip_extract doesn't work if file extension isn't "zip"

Post by mwb1100 »

The zip program that I use (PowerArchiver) adds a context menu entry "Open with PowerArchiver..." that shows up for any file so I can open things like .sublime-package or .jar files (which are java packages that use the zip format) easily.

I'd guess that a similar context menu entry can be added to do the same for whatever opens zip files on your machine - though I don't know any of the details on how to do that.

aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

Re: zip_extract doesn't work if file extension isn't "zip"

Post by aliteralmind »

mwb1100 wrote: .jar files (which are java packages that use the zip format)
Jar files! Another major example! C'mon XYplorer!!! :P

(Happy New Years everyone.)
Windows 8.1, 64-bit

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: zip_extract doesn't work if file extension isn't "zip"

Post by TheQwerty »

FYI: http://www.xyplorer.com/xyfc/viewtopic. ... 297#p89297

You can dive into the registry to add support for zip files with non-zip extensions.

Post Reply