rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: fafouine232 on September 21, 2015, 08:26:13 PM

Title: No archive since 2.3f
Post by: fafouine232 on September 21, 2015, 08:26:13 PM
Hello,

I just upgraded to HFS 2.3f and I can't get any archive download.

The page Says "Not Found" and puts a link to "Go to root".

It happens for single folder, multi-folder, single file and multi-file archive.

I tried it from different IP (at work and on my phone), on multiple platforms (Windows and Android) and from different folders in different hard drives.

So I deleted all my settings and reinstalled from zero with the same 2.3f and I get the same error.

Then I did the same thing again but this time, I installed 2.3e (build 293) and tada! It works! I can archive once again. Thank god!

I'm having a serious problem with the archive mode on the new 2.3f version. Anybody having the same issue?

I guess I'm going to stay with 2.3e for now.

Thanks
faf :)
Title: Re: No archive since 2.3f
Post by: bmartino1 on September 21, 2015, 09:58:47 PM
not familiar with archiving, I assume you are on the default template

And you are clicking a link in the webpage to "zip and tar the files to download them all?

Rejeto would be of more help here, as you can confirm it working in an older release and not a newer one...

Sorry :( good luck
Title: Re: No archive since 2.3f
Post by: fafouine232 on September 21, 2015, 11:34:59 PM
Thanks for replying!

Yes, I'm on default template.

Also, just to be clear, when I say archiving, I mean ticking (checking) one or many items and then clicking the "Archive" button in order to get a .tar archive.

This doesn't work for me on 2.3f but it works just fine on 2.3e... Weird!

See ya
faf :)
Title: Re: No archive since 2.3f
Post by: rejetto on October 17, 2015, 09:46:05 AM
fixed in 2.3g
Title: Re: No archive since 2.3f
Post by: click-click on December 05, 2015, 02:33:40 AM
I have 2.3g installed, but archive seems to be broken because when I check a single folder, I get an archive with that folder + 1 extra + 2 non-existent folders . Also, not all filetypes are being saved.
Title: Re: No archive since 2.3f
Post by: LeoNeeson on December 05, 2015, 07:39:55 AM
@click-click: those files/folders looks like to being generated by your operating system (Windows 8.1). What kind of folder are you sharing?...
Title: Re: No archive since 2.3f
Post by: bmartino1 on December 05, 2015, 07:04:09 PM
i think it has something to do with the file name, HFS has a hard item supporting files that are outside a certain character range. I have found that if the folder name is with in "a-z" or "1-0"  (only letters and numbers!) then it should work, i believe the "$" is causing issue for it, as HFS is unable to determine the folder / file...

it also looks like your tryin to share a temp directory!

http://superuser.com/questions/490910/whatdoes-the-sign-mean-when-part-of-a-file-or-folder-name
http://stackoverflow.com/questions/448371/why-are-these-folders-share-names-appended-with-dollar-signs
http://superuser.com/questions/64471/create-rename-a-file-folder-that-begins-with-a-dot-in-windows
Title: Re: No archive since 2.3f
Post by: click-click on December 06, 2015, 10:01:22 AM
@click-click: those files/folders looks like to being generated by your operating system (Windows 8.1). What kind of folder are you sharing?...
No. All folders created on the z: drive are mine. I am sharing the whole z: drive with my other PCs. It looks like archive is broken as is. As I mentioned before, 2 of the folders shown in the archive don''t even exist  on the drive.
Title: Re: No archive since 2.3f
Post by: click-click on December 06, 2015, 10:13:55 AM
i think it has something to do with the file name, HFS has a hard item supporting files that are outside a certain character range. I have found that if the folder name is with in "a-z" or "1-0"  (only letters and numbers!) then it should work, i believe the "$" is causing issue for it, as HFS is unable to determine the folder / file...

it also looks like your tryin to share a temp directory!

http://superuser.com/questions/490910/whatdoes-the-sign-mean-when-part-of-a-file-or-folder-name
http://stackoverflow.com/questions/448371/why-are-these-folders-share-names-appended-with-dollar-signs
http://superuser.com/questions/64471/create-rename-a-file-folder-that-begins-with-a-dot-in-windows

I use $ and other special characters in folder names to influence the way my folders are sorted. I renamed the folders without any special chars and I still get garbage included in the archive. Whatever  method HFS uses to create the tar file, it isn't working for me with folders. If I select individual files, that seems to work without problems, but I have only done limited testing on that.
Title: Re: No archive since 2.3f
Post by: click-click on December 06, 2015, 10:36:50 AM
Here's another problem with Archive. I have five files listed  from which I select three. Only two end up in the archive.
Code: [Select]
DelayedShutdown.lnk                                 545  3/07/2014 19:24
DelayedShutdown.pmc                                  94  3/07/2014 19:32
_W81OOBE.lnk                                        659  2/05/2014 19:04
_W8SetScaling.cmd                                   435  9/15/2015  1:13
_W8SetScaling.lnk                                  1081  3/16/2014 15:25

When I select all three .lnk files above, _W8SetScaling.lnk does not get included in the .tar
Title: Re: No archive since 2.3f
Post by: bmartino1 on December 06, 2015, 04:57:25 PM
i recall a forum topic regard file and archiving before.. *.Lnk / *.Shorcut files aren't included as it isn't actually a file...(there links...)

I can only asume then that it isn't the default template, after trying this myslef
(or there has been and edit form the default template)

http://www.rejetto.com/wiki/index.php?title=HFS:_Folder_Archives

there may be soem html  macro code floating aorund to fix this already as well:
http://www.rejetto.com/forum/hfs-~-http-file-server/cannot-open-tar-archives-with-some-software-linuxmaemo/msg1043721/#msg1043721
http://www.rejetto.com/wiki/index.php?title=HFS:_URL_parameters

in the default template this is the code the make the button and to run the archiving
--------------
Code: [Select]
{.if|{.get|can archive.}|
<button id='archiveBtn' onclick='if (confirm("{.!confirm.}")) submit({}, "{.get|url|mode=archive|recursive.}")'>{.!Archive.}</button>
.}
<a href="{.get|url|tpl=list|sort=|{.if not|{.length|{.?search.}.}|{:folders-filter=\|recursive:}.}.}">{.!Get list.}</a>
</center>
--------------
 
If your on the default template then i don't know what to tell you, give a list of file extensions that may be impacted... or look to the HFS .exe for a 7 zip that is run on click and download the contents, or zip them your self and host them with in the folder...

or maybe try a RARW template, i usual use live template, there are many on rarw for hfs:
http://rawr.thatstevensguy.com/projects/6/3.0.1/Live-3.0.1.zip

doe it work for you in live template?
Title: Re: No archive since 2.3f
Post by: click-click on December 07, 2015, 10:27:18 PM
I have no idea what template I'm on. All I see is the hfs.exe and a hfs.vfs that I created via the GUI. I've just
started using this program. I don't know how to implement different templates.
Title: Re: No archive since 2.3f
Post by: LeoNeeson on December 08, 2015, 06:11:40 AM
I have no idea what template I'm on. All I see is the hfs.exe and a hfs.vfs that I created via the GUI. I've just
started using this program. I don't know how to implement different templates.
@click-click: What are you using: "Real folder" or "Virtual folder (http://www.rejetto.com/wiki/index.php?title=HFS:_The_Virtual_File_System#What_is_a_real.2Fvirtual_folder)" in HFS? Try starting all over, and using "Real folder"...



I don't want to go out of the issue, but this make me wonder: how about implementing the ZIP format to HFS?...

ZIP is a well known format, supported by default starting from Windows XP, and as fast as TAR format, since the ZIP format offers to store files without compression (https://en.wikipedia.org/wiki/Zip_(file_format)#Compression_methods). ZIP format will overcome the "8 GB file limitation" that TAR format has (ZIP supports up to 16 exabytes (http://kb.winzip.com/kb/entry/99/)).

@Rejetto: It would be great to have ZIP support in HSF, at least for those who want to use it (as an option in HFS's menu). What do you think? Is it easy to natively implement it?... :)

> EDIT: In case someone else want to dig about this, I've found Abbrevia (http://sourceforge.net/projects/tpabbrevia/), but looks too much for simply making ZIP files. There are lots of more Delphi components listed here (http://torry.net/pages.php?s=99) and here (https://github.com/Fr0sT-Brutal/awesome-delphi#compression).
Title: Re: No archive since 2.3f
Post by: rejetto on December 26, 2015, 11:26:34 PM
i tried to reproduce the problem but to no avail.
i created a folder with name $_OEM$ and selected it for archiving: all was well.
can you send me a tar file with the problem?
anyway i tried opening the archive with both 7-zip and total commander.
Title: Re: No archive since 2.3f
Post by: rejetto on December 26, 2015, 11:36:40 PM
I don't want to go out of the issue, but this make me wonder: how about implementing the ZIP format to HFS?...

it was already discussed on the forum. Of course i would like to have zip format, but it's not that easy. HFS requires archives to be "streams" and "seekable", and that's not easy to make or find.
Title: Re: No archive since 2.3f
Post by: LeoNeeson on December 27, 2015, 10:32:39 AM
it was already discussed on the forum. Of course i would like to have zip format, but it's not that easy. HFS requires archives to be "streams" and "seekable", and that's not easy to make or find.
Don't worry if it can't be done, it was only an idea.

Anyway, I found out that you don't need complex libraries to add .zip support, since Windows can make zip files natively. Using a simple VBS Script, you can make a zip file directly without using any external app. I'm attaching a file about this (to test it, unzip the attachment in "C:\", then make the folder "Test" in "C:\", and put some files to compress there, and the run "MakingZipFile.bat"). Voila!, Windows will make the zip file (C:\SomeArchive.zip). Perhaps this can be useful to HFS in some way...
Title: Re: No archive since 2.3f
Post by: bmartino1 on December 29, 2015, 02:00:38 AM
in regards to zip archiving, I have found it easier to execute a portable 7-zip to "zip" file via a button and the html EXEC template commands, I no longer have the code, but had it working at one time :p

7zip command line stuff
http://superuser.com/questions/545442/7-zip-commandline-how-to-archive-with-subdirectories-or-how-to-keep-folder-str

CMD commands
(tar)
7z.exe a -t7z NewArchivePath PathOfFolderToArchive

(standard 7z)
7z a -r MyArchiveName.7z PathOfFolderToArchive

add it via vba script / hta to your script via leo Thx leo :)
http://www.csidata.com/custserv/onlinehelp/VBSdocs/vbs9.htm
http://stackoverflow.com/questions/17956651/execute-a-command-in-command-prompt-using-excel-vba
http://www.anysitesupport.com/vba-run-a-command-at-the-command-prompt-from-vba/
Title: Re: No archive since 2.3f
Post by: click-click on December 29, 2015, 01:03:57 PM
Where are these templates everyone is talking about? Can someone give a step by step example how these are used?
Title: Re: No archive since 2.3f
Post by: click-click on December 29, 2015, 01:16:51 PM
i tried to reproduce the problem but to no avail.
i created a folder with name $_OEM$ and selected it for archiving: all was well.
can you send me a tar file with the problem?
anyway i tried opening the archive with both 7-zip and total commander.

Hi rejetto, I sent you a PM because the the rar is more the 500kb and I can't append here. I think the problem has to do with .lnk files. If you test with a directory including a few link files along with other files, the archive function gets confused and does strange things. the .lnk files should be treated like any other file. Normal compression programs don't have a problem with .lnk files.
Title: Re: No archive since 2.3f
Post by: Mars on December 29, 2015, 05:46:58 PM
I think the problem has to do with .lnk files. If you test with a directory including a few link files along with other files, the archive function gets confused and does strange things. the .lnk files should be treated like any other file.


http://superuser.com/questions/77872/how-to-mount-ntfs-folder-in-another-ntfs-folder
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#download
Title: Re: No archive since 2.3f
Post by: click-click on December 29, 2015, 08:11:13 PM
I have no idea what you are trying to tell me. What do these links have to do with archiving?   ???
My point was that a .lnk files should get archived like any other file. Standard archivng apps have no problem with these.
Title: Re: No archive since 2.3f
Post by: Mars on December 29, 2015, 09:58:00 PM
I was as it were on another planet  ;D
I try an experiment with styles linux directory links but under windows  ::)


I see your problem better

when a .lnk file (on HDD) points to a file (real), it appears in the list of files on web and is countable in the TAR archive, but if that link is in a subdirectory, it is not recognized and not included in the final archive

analysing to reproduce from hfs sources,

 see later for new release
Title: Re: No archive since 2.3f
Post by: rejetto on January 06, 2016, 11:00:39 PM
0. guys, as i told you it's not just "creating" the zip. There are other requirements that are very hard to find or make, the ones i listed, but i understand they are hard to understand for non-programmers. Thank you anyway.

1. lnk files are "followed" by HFS, i mean: when you download, you get the linked file, not the link itself.  That's true also for the archive.
I decided to handle it this way as I think most users will expect this, even if in few cases you may want the opposite.
While testing I noticed 2 bugs anyway: the file size displayed in the page was wrong, and inside the archive the path was also wrong. (but no file was missing)

2. i got your files click-click, and it's not a rar, it's a tar, as HFS produces tar, but i guess you just renamed it. Renaming doesn't really change the nature of a file, and some programs recognize the real format even when the name is wrong. Otherwise it would tell you that the file is broken, as it's not a rar.

3. I opened your archive with both total commander and 7-zip, as i don't have winrar, and i see the same list, but it's different from your list, and it is:
81 (folder)
Hold (folder)
Creater.exe

Inside 81 only 1 file: _OOBE.cmd
Inside Hold 2 files: DelayedShutdown.pmc _W8SetScaling.cmd

Then, i don't know if your problem is with winrar, in part at least. Let me know if you test with another software. 7-zip is free and good.
Otherwise I still don't understand what's causing your problem.
I guess the best option for me to understand your problem is
a) make a folder and put files/links in a way that causes the problem, but with few files. The less the better.
b) make a zip of such folder and send it to me.
Title: Re: No archive since 2.3f
Post by: click-click on January 08, 2016, 02:46:19 PM
The selections file is the file created by HFS. It is a tar file and I must have uploaded it as a rar. The zip file is the actual folder that I tried to archive for you to test with. I'm pretty sure all this is being caused by HFS trying to follow the link during the archive. The _OOBE.lnk points to Z:\$W8i\$_OEM$_81\_OOBE.cmd, the _DelayedShutdown.lnk points to
C:\Toolbx\MacroCreator.exe Z:\$All\$_OEM$\DelayedShutdown.pmc -s and the __W8SetScaling.lnk is pointing to
Z:\$All\$_OEM$\_W8SetScaling.cmd. If you look at the paths of each link, you will see parts of them that ended up in the tar.