Code Monkey home page Code Monkey logo

zipfile's People

Contributors

benbjohnson avatar dae avatar hansemannn avatar jturnbull avatar kant avatar kosso avatar termit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

zipfile's Issues

Using ZipFile with TiMobile 1.8.0

Hi,

While building the plugin using 1.8.0 works fine, using the actual plugin doesn't work.

This error is thrown upon calling zipfile.extract(file, Ti.Filesystem.applicationDataDirectory);:

[INFO] <null>
2011-05-14 16:50:45.808 Minecrafter[20358:5d03] -[NSNull length]: unrecognized selector sent to instance 0x24445e8
[ERROR] The application has crashed with an unhandled exception. Stack trace:
0 CoreFoundation 0x023d758c __exceptionPreprocess + 156
1 libobjc.A.dylib 0x0252b313 objc_exception_throw + 44
2 CoreFoundation 0x023d90bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02348966 ___forwarding___ + 966
4 CoreFoundation 0x02348522 _CF_forwarding_prep_0 + 50
5 Foundation 0x006ad586 -[NSFileManager fileExistsAtPath:] + 45
6 Minecrafter 0x00333e26 -[ZipfileModule extract:] + 125
7 CoreFoundation 0x02347c7d __invoking___ + 29
8 CoreFoundation 0x02347b51 -[NSInvocation invoke] + 145
9 Minecrafter 0x0004e3c8 -[KrollMethod call:] + 3096
10 Minecrafter 0x0004ce5e KrollCallAsFunction + 542
11 Minecrafter 0x002de6c9 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 391
12 Minecrafter 0x002bb98b cti_op_call_NotTiFunction + 299
13 ??? 0x0e23facb 0x0 + 237238987
14 Minecrafter 0x002785d5 _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 975
15 Minecrafter 0x002c9dbd _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 129
16 Minecrafter 0x002414cb _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 91
17 Minecrafter 0x002dc9e6 TiObjectCallAsFunction + 454
18 Minecrafter 0x000562e8 -[KrollObject invokeCallbackForKey:withObject:thisObject:] + 856
19 Minecrafter 0x000452a2 -[ExpandedInvocationOperation main] + 210
20 Foundation 0x006d1b76 -[__NSOperationInternal start] + 747
21 Minecrafter 0x00047fb6 -[KrollContext invoke:] + 150
22 Minecrafter 0x000467aa -[KrollContext main] + 4346
23 Foundation 0x006abcf4 -[NSThread main] + 81
24 Foundation 0x006abc80 __NSThread__main__ + 1387
25 libSystem.B.dylib 0x947917fd _pthread_start + 345
26 libSystem.B.dylib 0x94791682 thread_start + 34
2011-05-14 16:50:45.851 Minecrafter[20358:5d03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x24445e8'
*** Call stack at first throw:
(
0 CoreFoundation 0x023d75a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0252b313 objc_exception_throw + 44
2 CoreFoundation 0x023d90bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02348966 ___forwarding___ + 966
4 CoreFoundation 0x02348522 _CF_forwarding_prep_0 + 50
5 Foundation 0x006ad586 -[NSFileManager fileExistsAtPath:] + 45
6 Minecrafter 0x00333e26 -[ZipfileModule extract:] + 125
7 CoreFoundation 0x02347c7d __invoking___ + 29
8 CoreFoundation 0x02347b51 -[NSInvocation invoke] + 145
9 Minecrafter 0x0004e3c8 -[KrollMethod call:] + 3096
10 Minecrafter 0x0004ce5e KrollCallAsFunction + 542
11 Minecrafter 0x002de6c9 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 391
12 Minecrafter 0x002bb98b cti_op_call_NotTiFunction + 299
13 ??? 0x0e23facb 0x0 + 237238987
14 Minecrafter 0x002785d5 _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 975
15 Minecrafter 0x002c9dbd _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 129
16 Minecrafter 0x002414cb _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 91
17 Minecrafter 0x002dc9e6 TiObjectCallAsFunction + 454
18 Minecrafter 0x000562e8 -[KrollObject invokeCallbackForKey:withObject:thisObject:] + 856
19 Minecrafter 0x000452a2 -[ExpandedInvocationOperation main] + 210
20 Foundation 0x006d1b76 -[__NSOperationInternal start] + 747
21 Minecrafter 0x00047fb6 -[KrollContext invoke:] + 150
22 Minecrafter 0x000467aa -[KrollContext main] + 4346
23 Foundation 0x006abcf4 -[NSThread main] + 81
24 Foundation 0x006abc80 __NSThread__main__ + 1387
25 libSystem.B.dylib 0x947917fd _pthread_start + 345
26 libSystem.B.dylib 0x94791682 thread_start + 34
)
terminate called after throwing an instance of 'NSException'

I tried to use the ZipFile module a while ago with a 1.7 continuous build, but that resulted in the same error.

Module installs, no errors, but no unzipped files either

I have installed the module and am running the following code in Ti Mobile 1.8.2

var zipfile = require('zipfile');

var concordance = Ti.Filesystem.resourcesDirectory+'data/files/concordance/e/Concordance.zip';

zipfile.extract(concordance, Ti.Filesystem.applicationDataDirectory);

All directories and files exist. No errors are shown even when showing Debug errors. It looks like everything worked fine - but there are no extracted files.

I am using the 0.1.21.zip that was precompiled. I also can see that the module is loaded:

[INFO] [object ZipfileModule] loaded

Please help me get this working.

Cannot build module in OSX Mountain Lion

When trying to build the module, I receive the following error:

The following build commands failed:
    CompileC build/ZipFile.build/Release-iphoneos/zipfile.build/Objects-normal/armv7/ZipfileModule.o Classes/ZipfileModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild failed

A clean installation of OSX Mountain Lion was installed, I did not upgrade from a previous OS.

iOS 7 is not compatable

I was glad using zipfile module for my projects.
I updated my xcode and titanium, now, it seems to crash. The app doesnot extract the zip. Need the reply asap.

zipfile-iphone-0.1.18.zip contains odd moduleid.

When I have installed zipfile-iphone-0.1.18.zip package with TitaniumModileSDK1.7.0,
I got an error ”Couldn't find module: zipfile. ”

I guess the reason is, zipfile-iphone-0.1.18.zip manifest file has 'com.generalarcade.ZipFile' as moduleid.
Please release zipfile-iphone-0.1.21.zip package.

Debugmessage 'Can't find zip file'

Hi,

I tried to use the module but it looks like the module can't find the zip file. I get the following messages in the Titanium console, if I start the app in the iOS simulator:

[INFO] [object ZipfileModule] loaded

[DEBUG] loading: /Users/calibanatspace/Documents/Titanium Studio Workspace/UEGW 2011/Resources/zipfile.js, resource: Users/calibanatspace/Documents/Titanium Studio Workspace/UEGW 2011/Resources/zipfile_js

[DEBUG] Can't find zip file

[DEBUG] can't open zip

I've tried it with SDK 1.7.2 and 1.8.0.xxx.

I've tested with code if the zip file is readable:

function extractZipFile( filePath )
{
   var LOG_TAG = 'extractZipFile( filePath )';
   log( 'filePath: ' + filePath, LOG_TAG );
   var testfile = Ti.Filesystem.getFile( filePath );
   if( testfile.exists() )
   {
      log( 'nativePath: ' + testfile.nativePath, LOG_TAG );
      log( 'length: ' + testfile.read().length, LOG_TAG );
   }

  var zipfile = require("zipfile");
  zipfile.extract( filePath, Ti.Filesystem.applicationDataDirectory );
}

The output in the console:

[INFO] extractZipFile( filePath ): filePath: file://localhost/Users/calibanatspace/Library/Application%20Support/iPhone%20Simulator/4.3/Applications/916D28F8-266C-42F6-AF49-8F1419148794/UEGW%202011.app/data/program/sessions.xml.zip

[INFO] extractZipFile( filePath ): nativePath: file://localhost/Users/calibanatspace/Library/Application%20Support/iPhone%20Simulator/4.3/Applications/916D28F8-266C-42F6-AF49-8F1419148794/UEGW%202011.app/data/program/sessions.xml.zip

[INFO] extractZipFile( filePath ): length: 139433

[INFO] [object ZipfileModule] loaded

[DEBUG] loading: /Users/calibanatspace/Library/Application Support/iPhone Simulator/4.3/Applications/916D28F8-266C-42F6-AF49-8F1419148794/UEGW 2011.app/zipfile.js, resource: zipfile_js

[DEBUG] Can't find zip file

[DEBUG] can't open zip

Anyone could provide hints what is wrong?

Regards, Jochen

[DEBUG] Can't find zip file

On SDK1.7.0, Something changed? ZipFile doesn't work with TitaniumSDK1.7.0

When I run the code on 'Zip File Extraction Example' , I get
[DEBUG] Can't find zip file
[DEBUG] can't open zip

Here is a workaround:

    var appDir = 
        Ti.Network.decodeURIComponent(Ti.Filesystem.applicationDataDirectory).replace('file://localhost','') ;
    zipfile.extract(appDir+'/test.zip', Ti.Filesystem.applicationDataDirectory);

Binaries

Are there precompiled binaries for v0.1.21 or newer? I only saw v0.1.18 on the Downloads page in GitHub. Is there somewhere else I can find newer binaries?

I tried pulling down the code and running it but I get this message:

** BUILD FAILED **

The following build commands failed:
    CompileC build/ZipFile.build/Release-iphoneos/zipfile.build/Objects-normal/armv6/ZipfileModule.o Classes/ZipfileModule.m normal armv6 objective-c com.apple.compilers.gcc.4_2
(1 failure)
xcodebuild failed

I'm not a C developer so I'm not sure what the CompileC command is supposed to do.

Zipfile no longer extracting zip files

Hello. I recently upgraded my computer to Lion. Zipfile is loading fine, but files are no longer extracting files in my application. It acts as if the files extract, but the directory is empty.

To clarify, first I crate a directory inside the app dir, and then run an extract on that dir. the directory is created just fine. However, the dir is never populated with the files from the zip.

zipfile 0.1.21 osx lion, SDK 1.8.2, xcode 4.2

Hoping that we can get this resolved, willing to donate for solution :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.